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

From: Date: Sat, 08 Feb 2003 20:45:39 +0000
Subject: Re: Alternating Row Colors in PHP........
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134892@lists.php.net to get a copy of this message
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 (#134892) next »