> I put the output of the database query in a table. It works fine. Now I have a need >to make the alternate rows of a different color. > > Can someone please help me with the code?
$cols = array('#ff0000','#00ff00');
$i = 0;
while(your_loop_to_output_each_row) {
echo '<tr bgcolor="'.$cols[$i%2].'"><td>$row_data</td></tr>';
}
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

