我已經寫了這個代碼:
<?php $offset = 0; ?>
<?php $Counter = 0; ?>
<?php $IsRD = 1; ?>
<?php $temp = 0; ?>
<?php $TmpString = $_helper->productAttribute($_product, nl2br($_product->getprojector_compatibility()) , 'projector_compatibility');?>
<?php echo "<table border=\"0\" align=\"center\">"; ?>
<?php echo "<tr><th><h1>Compatibility:</h1></th></tr>"; ?>
<?php if(strpos( $TmpString, ";") == 0){
$Counter++;
$IsRD++;
echo "<tr><td>The #$Counter is at position - 0 </td>";
} ?>
<?php
while($offset = strpos($TmpString, ";", $offset + 1)){
if ($IsRD == 3) {
$Counter++;
$IsRD++;
echo "<td>" , $substr($TmpString,$temp,$offset-$temp) , "</td></tr><tr>";
$IsRD=1;
$temp=$offset;
}
else {
$IsRD++;
$Counter++;
**line 171** echo "<td>", $substr($TmpString,$temp,$offset-$temp),"</td>";
$temp=$offset;
}
} ?>
<?php echo "</tr></table>"; ?>
,當我運行它,我得到這個錯誤:
Fatal error: Function name must be a string in /home/...../view.phtml on line 171
我缺少/做錯了嗎?