PHP / HTML中的语法错误-解析错误

时间:2018-06-23 22:24:39

标签: php html schema

我正在尝试在页面中为其特定部分添加一些模式。我从没做过Schema,也从未使用过PHP。

我遇到解析错误,看不到我做错了什么,任何人都可以帮忙。

$allpolicies_arr[] = '<span itemprop="name">'. $policyvalue->PolicyName.'</span>' ;
$str_policy_details .= '<div class="col-sm-8 no-justify"><span itemprop="author"><p>'.Thats Insurance .'</span><span itemprop="itemReviewed">'.Rating for .ucfirst($policyvalue->PolicyName).':</span></p> </div>'; 
$str_policy_details .= '<div class="col-sm-4 "><span itemprop="ratingValue"><p>'.get_star_rating_text($policyvalue->StarRating_StarRatingID).'</span></p></div>';
$str_policy_details .= '</div>';

1 个答案:

答案 0 :(得分:1)

此行是错误的,您正在将测试放入字符串中,但不在引号内

$str_policy_details .= '<div class="col-sm-8 no-justify"><span itemprop="author"><p>'.Thats Insurance .'</span><span itemprop="itemReviewed">'.Rating for .ucfirst($policyvalue->PolicyName).':</span></p> </div>'; 

尝试

$str_policy_details .= '<div class="col-sm-8 no-justify"><span itemprop="author"><p>Thats Insurance </span><span itemprop="itemReviewed">Rating for '.ucfirst($policyvalue->PolicyName).':</span></p> </div>';