Another method of alternating row colours in a loop is like so:
$col1 = "#CCCCCC";
$col2 = "#DDDDDD";
$col = $col1;
echo "<table>\n";
while (<your conditions here>) {
echo "<tr bgcolour=\"$col\">\n";
echo "<td>Cell Data</td>\n";
echo "</tr>\n";
$col == $col1 ? $col = $col2 : $col = $col1;
}
echo "</table>\n";
-geoff