I don't know if this helps...
Code:
# this function chooses a color depending on whether it is an odd or even number.
function setrowcolor($i, $row_bgcolor1, $row_bgcolor2) {
if ($i % 2) {
return $row_bgcolor1;
} else {
return $row_bgcolor2;
}
} // end function
# replace color1 and color2 with your colors
# you have to loop through the records, or calculate the total size of iterations.
# alternatively you could do a normal while/wend loop and set up $i as a counter that
# increases for every loop.
for ($i = 0; $i < NUMBER_OF_RECORDS; $i++) {
$setColor=setrowcolor($i, COLOR1, COLOR2);
?>
<tr bgcolor="<?=$setColor;?>">
... your table row data ...
</tr>
<?php
} # next
Bookmarks