我不斷收到以下錯誤在我的日誌什麼是錯的這個PHP代碼 - 意外T_CONSTANT
PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'
的錯誤與這條線,但我不知道有什麼地方錯了
<?php
if ($num != null) {
$query_string = 'msisdn=' . $num . '&ref=' . get_post_meta($post->ID, "ref", $single = true) ;
echo '<div class="highlight"><a href="http://www.site.com/exJoin?signup=y&' . htmlentities($query_string) . '"><b>Join Now</b></a></div>';
}
else{
echo '<div class="highlight"><a href="<?php echo TeraWurflHelper::getPhoneHref('+2711111111'); ?>"><b>Join Now</b></a></div>';
}
?>
正確的縮進有助於發現錯誤。 –