Re: Table question....

From: Date: Thu, 03 Oct 2002 12:59:58 +0000
Subject: Re: Table question....
Groups: php.db 
Request: Send a blank email to php-db+get-22199@lists.php.net to get a copy of this message
if you mean the rows switching colors i use this. in this example i'm getting data from mysql $rs = 0; for($i = 0; $i < count($rs); ) { while ($rs = mysql_fetch_array($result)) { $bgcolor = ($i % 2) ? 'blue' : 'black'; //do stuff $i++; } } then $bgcolor goes in each <td bgcolor=$bgcolor ....... hth jd "Rodrigo" <rodrigo@praticsistem To: "PHP" <php-db@lists.php.net> as.com.br> cc: Subject: [PHP-DB] Table question.... 10/03/2002 08:59 AM Please respond to "Rodrigo" Hi people, is there a way to print a table with the background switching colors??? like one blue, the next black, blue, black....... thanks in advance... Equipe Pratic Sistemas Rodrigo Corrêa Fone: (14) 441-1700 suporte@praticsistemas.com.br rodrigo@praticsistemas.com.br

« previous php.db (#22199) next »