PHP循环中的交替颜色行
作者:互联网
如何在我的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”,因为在这个问题中不允许这样做.
标签:php,while-loop,rows,alternating 来源: https://codeday.me/bug/20190716/1482564.html