Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php-在echo中使用html时出错_Php_Html_Apache_Echo - Fatal编程技术网

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