This is a very simple way to alternate row colors for a MySQL query:
Code:
<html>
<head>
<style type='text/css'>
#1 (
background: #000;
color: #fff;
}
#0 {
background: #fff;
color: #000;
}
</style>
</head>
<body>
[php]
<?php
// Your Query Here.....
$x = 0;
echo "<table>";
while ($result = mysql_fetch_assoc($query))
{
$x = 1 - $x;
echo "<tr><td id=\"$x\">$result</td></tr>";
}
echo "</table>";
?>
[/php]
Code:
</body>
</html>