如果行显示不存在结果,如何更改字体颜色
如果行显示不存在如何更改行的字体颜色我该怎么做请帮我解决这个问题谢谢
这是代码
$result1 = mysql_query("SELECT * FROM attendance where date '2013-4-30' order by date ASC");
while($row = mysql_fetch_array($result1))
{
// echo out the contents of each row into a table
echo "<tr>";
echo '<td>' . $row['teacherid'] . '</td>';
echo '<td>' . $row['name'] . '</td>';
echo '<td>' . $row['date'] . '</td>';
echo '<td>' . $row['attendance'] . '</td>';
echo "</tr>";
这是这段代码的结果
-------------------------------------------
Teacher Id | Name | Date |Attendance |
--------------------------------------------
919 | Abcd |2013-4-30 |present
918 | xyz |2013-4-30 |absent
815 | 123 |2013-4-30 |present
-------------------------------------------
我想改变缺席的文字颜色