php-在echo中使用html时出错
我正在使用:php-在echo中使用html时出错,php,html,apache,echo,Php,Html,Apache,Echo,我正在使用: if (condition) { ..statements.. } else { echo '<div class="errormsgbox">'. $json->text.'</div>'; } 我不认为我输入了错误的语法,有什么可能是错误的?显示该行周围的代码。在$json->text中有什么,它是否也包含errormsgbox某个地方?@ziGi no它只包含一个电话号码。@johncode我不知道我的代码是错的还是错的,在我在
if (condition) {
..statements..
} else {
echo '<div class="errormsgbox">'. $json->text.'</div>';
}
我不认为我输入了错误的语法,有什么可能是错误的?显示该行周围的代码。在
$json->text
中有什么,它是否也包含errormsgbox
某个地方?@ziGi no它只包含一个电话号码。@johncode我不知道我的代码是错的还是错的,在我在php.ini中打开“display_errors”并重新启动Apache之前,它已经工作了。听起来您可能在..语句中有一个不平衡的双引号(“)。它与类的第一个匹配,生成了errormsgbox和意外的字符串。
Parse error: syntax error, unexpected 'errormsgbox' (T_STRING) in index.php on line 49