RE: [PHP] alternating row color--newbie help
| From: | Don Read | Date: | Fri, 16 Apr 2004 20:30:52 +0000 |
| Subject: | RE: [PHP] alternating row color--newbie help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-183700@lists.php.net to get a copy of this message | ||
On 15-Apr-2004 Chris W. Parker wrote:
<snip>
> for($i = 0; $i < $numofrows; $i++)
> {
> ...
> $row_color = ($i % 2 == 0) ? "yellow" : "white" ;
$row_color = $row_color == "yellow" ? "white" : "yellow" ;
>
> echo "<tr bgcolor=\"$row_color\">\n";
> ...
Regards,
--
Don Read dread@ispwest.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.