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

2003-02-08 Thread Brian V Bonini
On Sat, 2003-02-08 at 18:25, CF High wrote: > Hey all. > > I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the > following: > > > > Any ideas how to do this in PHP? > One possibility: while (whatever) { $bgcolor = ($i++ & 1) ? '#c0c0c0' : '#ff'; echo "bla-bla

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

2003-02-08 Thread Noah
Thanks olinux. Just what I was looking for -- I'll check it out. -Noah - Original Message - From: "olinux" <[EMAIL PROTECTED]> To: "CF High" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 08, 2003 12:45 PM Subje

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

2003-02-08 Thread Chris Hayes
At 00:25 9-2-2003, you wrote: Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: Any ideas how to do this in PHP? one way would be: $color_toggle=true; $color1='red'; $color2='white'; $output=""; for ($i=0;$i<10;$i++) //or any other way to w

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

2003-02-08 Thread olinux
Pop this in your loop $bgcolor = ($i++ % 2) ? '#FF' : '#EE'; echo ""; olinux --- CF High <[EMAIL PROTECTED]> wrote: > Hey all. > > I'm coming from Cold Fusion to PHP; in CF I could > alternate rows with the > following: > > > > Any ideas how to do this in PHP? > > Thanks for c

[PHP] Alternating Row Colors in PHP........

2003-02-08 Thread CF High
Hey all. I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the following: 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