如何在我的 php 循环中有交替的颜色行?
$num = mysql_num_rows($qPhysician);
$i=0;
while($i < $num)
{
echo "<tr>";
echo "<td>" . mysql_result($qPhysician,$i,"lastName") . "</td>";
echo "<td>" . mysql_result($qPhysician,$i,"firstName") . "</td>";
echo "</tr>";
$i++;
}
我必须省略“tr”和“td”的“<”和“>”,因为在这个问题中不允许这样做。:)
谢谢!