Re: Alternating Row Colors in PHP........

From: Date: Sun, 09 Feb 2003 00:03:09 +0000
Subject: Re: Alternating Row Colors in PHP........
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134896@lists.php.net to get a copy of this message
Thanks olinux. Just what I was looking for -- I'll check it out......... -Noah ----- Original Message ----- From: "olinux" <olnx@yahoo.com> To: "CF High" <noah@newminddesign.com>; <php-general@lists.php.net> Sent: Saturday, February 08, 2003 12:45 PM Subject: Re: [PHP] Alternating Row Colors in PHP........ > Pop this in your loop > > $bgcolor = ($i++ % 2) ? '#FFFFFF' : '#EEEEEE'; > > echo "<tr bgcolor=\"$bgcolor\">"; > > olinux > > > --- CF High <noah@newminddesign.com> wrote: > > Hey all. > > > > I'm coming from Cold Fusion to PHP; in CF I could > > alternate rows with the > > following: > > > > <tr bgcolor="###Iif(((CurrentRow MOD 2) is > > 0),de('FFFFFF'),de('EEEEEE'))#"> > > > > Any ideas how to do this in PHP? > > > > Thanks for clues, > > > > --Noah > > > > -- > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com >

« previous php.general (#134896) next »