此代码T_CONSTANT_ENCAPSED_STRING错误:,我解决不了
$current_user = get_currentuseinfo();
foreach ($alleds as $ed) {
$checked = (in_array($ed->ID,(array)$currenteds)) ? ' checked="checked"' : '';
$disabled = (!current_user_can('administrator') && $current_user->ID !== $ed->ID) ? ' disabled="disabled" : '';
echo '<input type="checkbox" name="currenteds[]" value="' . $ed->ID . '"' .$checked . '" '.$disabled.' /><label for="ratings[]">'.$ed->user_nicename.'</label>';
}
是给我这个错误:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
现在,我一直在努力,为什么我收到这个错误我的头包裹成,但我想不明白。问题可能在echo
行。你知道这个问题是什么以及我如何解决它?
您可以使用称为_counting_的古老技术非常简单地解决这个问题。语法突出显示还可以确切显示问题出在哪里。如果你没有试图将尽可能多的代码塞入每一行,这对你来说更容易发现。将代码展开一点。 –