我在HTML tr
標記裏面使用了echo
,我收到一個錯誤。如何在html表格行中使用echo?
這裏是我的代碼
的index.php
<?php
$i=0;
while($row=mysql_fetch_array($ros))
{
if($i%2==0)
$classname="evenRow";
else
$classname="oddRow";
echo '<tr class="id" >';
echo '<tr class="'echo $classname'">';
?>
我收到以下錯誤:
Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in E:\xampp\htdocs\pagination\index.php on line 64
我要去哪裏錯了,我如何能實現我的期望輸出?
在此先感謝
回聲內回聲?! – arunrc 2014-08-28 05:51:35
我試圖用一個回聲沒有工作 – 2014-08-28 05:52:30
檢查答案... – arunrc 2014-08-28 05:52:47