Re: alternating row color--newbie help

From: Date: Thu, 15 Apr 2004 20:38:17 +0000
Subject: Re: alternating row color--newbie help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-183565@lists.php.net to get a copy of this message
On Thu, 15 Apr 2004 16:02:14 -0400 "Montagna, Dan" <Montagna@PVPC.ORG> wrote: > > I'd appreciate any hints on this... > > Thanks > > Dan I created a function (so I don't have to rewrite it all the time) for doing this very thing. function everyOtherRow($i, $oddColor = '#e0ffff', $evenColor = 'white') { if ($i % 2 == 0) { # even numbered row color $color = $evenColor; } else { # odd numbered row color $color = $oddColor; } return $color; } -- Raquel ============================================================ A life isn't significant except for its impact on other lives. --Jackie Robinson

« previous php.general (#183565) next »