Re: [PHP] alternating row color--newbie help

2004-04-16 Thread Raquel Rice
On Fri, 16 Apr 2004 11:26:37 -0700 David A. Stevens [EMAIL PROTECTED] wrote: Please remove my address from any future correspondence about PHP. Mr. Stevens, I assume you had some reason for sending this to me privately. As I'm only a member of an email list, [EMAIL PROTECTED]. I'd suggest

RE: [PHP] alternating row color--newbie help

2004-04-16 Thread Don Read
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

[PHP] alternating row color--newbie help

2004-04-15 Thread Montagna, Dan
Hi everyone, Well, I've hit all the forums and tried it a few different ways, but I still can't get this code to work. At this point it just shows me an empty table with column headings. I am new and still experimenting, but can someone tell me what is wrong here? This is pretty much straight

RE: [PHP] alternating row color--newbie help

2004-04-15 Thread Jay Blanchard
[snip] I'd appreciate any hints on this... [/snip] Try this (verbose) /* change the row color */ if(0 == $rc){ $colorClass = white; echo tr bgcolor=\white\\n; $rc++; } else { $colorClass = grey; echo tr bgcolor=\yellow\\n; $rc--; } -- PHP

RE: [PHP] alternating row color--newbie help

2004-04-15 Thread Chris W. Parker
Montagna, Dan mailto:[EMAIL PROTECTED] on Thursday, April 15, 2004 1:02 PM said: Hi everyone, hi. for($i = 0; $i $numofrows; $i++) { $row = mysql_fetch_array($result); //get a row from our result set if($i % 2) { //this means if there is a remainder echo TR

Re: [PHP] alternating row color--newbie help

2004-04-15 Thread Raquel Rice
On Thu, 15 Apr 2004 16:02:14 -0400 Montagna, Dan [EMAIL PROTECTED] 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 = '#e0', $evenColor =

Re: [PHP] alternating row color--newbie help

2004-04-15 Thread Daniel Clark
Are you sure there is data in name, phonenumber, age ?? Well, I've hit all the forums and tried it a few different ways, but I still can't get this code to work. At this point it just shows me an empty table with column headings. I am new and still experimenting, but can someone tell me

Re: [PHP] alternating row color--newbie help

2004-04-15 Thread John W. Holmes
Montagna, Dan wrote: [snip] I'd appreciate any hints on this... See FAQ #38 here: http://forums.devshed.com/t25412/s.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing