Re: Table Output Question

From: Date: Tue, 15 Nov 2005 02:26:36 +0000
Subject: Re: Table Output Question
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-40665@lists.php.net to get a copy of this message
Micah Stevens <micah@raincross-tech.com> wrote: > > You don't have to output two rows.. just do this: > > $color = "red"; // init first color. > while ($row = mysql_fetch_assoc($data)) { > if ($color == "red") { > $color = "blue"; > } else { > $color = "red"; > } > ?> > <tr > bgcolor="<?=$color?>"><td>..................</td></tr> > > <? > } > > -Micah Great, thanks for the help and information. May I ask, how does PHP know to change the color? What do the "?"'s do in "<?=$color?>"? Thanks for the help. Jeff

« previous php.db (#40665) next »