Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Glenn Sieb
On 05:11 PM 5/10/2002 -0500, Shaun Thomas wrote: >This could use a few tweaks. Ok I got it now... This exhibits the behaviour I was looking for, and, thanks to you, is much easier to read and maintain! :))) Thanks, Shaun! Glenn $sPrevCompany = $sColor = ''; while ($aRow = mss

Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Glenn Sieb
Thanks! I'll play with this!!! :) Glenn On 05:11 PM 5/10/2002 -0500, Shaun Thomas wrote: >This could use a few tweaks. First off, putting mysql_num_rows in the >actual for loop executes it every iteration. Bad. Second, consider >giving your code some readability by returning an associative ar

Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Shaun Thomas
On Fri, 10 May 2002, Glenn Sieb wrote: > Thanks for all the hints--here's what my boss and I eventually came > out with: This could use a few tweaks. First off, putting mysql_num_rows in the actual for loop executes it every iteration. Bad. Second, consider giving your code some readability

Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Robert Cummings
"1LT John W. Holmes" wrote: > > Read the code again, that's what I first thought, too. He's just not > printing multiple values for the first table cell. So if the current row has > the same company name, just print a blank cell, then print the rest of the > data for that row. In the words of a

Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread 1LT John W. Holmes
- Original Message - From: "Robert Cummings" <[EMAIL PROTECTED]> > Glenn Sieb wrote: > > $cname = (strcmp($previous,$line[0]) > > ? $line[0] : " "); > > print (" > BGCOLOR=#$color>\n\t$line[2]\n\t$cname\n\t$line[3]

Re: [PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Robert Cummings
Glenn Sieb wrote: > > Hey everyone! > > Thanks for all the hints--here's what my boss and I eventually came out with: > > /* ## > ## And for every row of data we pull, we create a table row... > ## */ > $company = 0; >

[PHP] Alternating Table Rows, Part Deux..

2002-05-10 Thread Glenn Sieb
Hey everyone! Thanks for all the hints--here's what my boss and I eventually came out with: /* ## ## And for every row of data we pull, we create a table row... ## */ $company = 0; $previous = ""; for ($i =