While( .... ) {   
   ...

   $color = ($color == "FFFFFF")? "EAEAEA" : "FFFFFF";
   print "<td bgcolor='#$color'>\n";

   ...
}

-----Original Message-----
From: Christopher J. Crane [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 04, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Returning Rows Question


How do you alternate colors of the rows in a table inside a while
statement when dealing with the output of data from a DB. I am sure it's
something simple but I keep getting into some really long math thing...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to