Row colors

From: Date: Mon, 09 Apr 2001 00:08:10 +0000
Subject: Row colors
Groups: php.general 
Request: Send a blank email to php-general+get-47682@lists.php.net to get a copy of this message
I can change the column sof a table with the following code but how do I change the row colors instead.With the columns I have "i" to manipulate but not with rows. while ($row = mysql_fetch_row($result)) {{ echo "<TR>\n"; for ($i =1;$i<mysql_num_fields($result);$i++) {$cell_color = "#C0C0C0"; $i % 2 ? 0: $cell_color = "#CCCCCC"; echo "<td bgcolor=\"$cell_color\">$row[$i]</td>"; Thanks Mike P mpeloso@princeton.edu

« previous php.general (#47682) next »