you could alternate using a php variable... like this sorta:
$sql = "SELECT * FROM users";
$sql_r = mysql_query($sql);
$alternate = 0;
echo("<table>");
while ($u = mysql_fetch_array($sql_r)) {
if ($alternate == 0) {
echo("<tr bgcolor=\"blue\">");
$alternate = 1;
} else {
echo("<tr bgcolor=\"red\">");
$alternate = 0;
}
echo ("<td>".$u["id"]."</td>");
echo ("<td>".$u["user"]."</td>");
echo ("</tr>");
}
echo ("</table>");
hope that shows up right and you can get the idea.