RE: [PHP] Alternate row color
| From: | Michael Richardson | Date: | Wed, 09 Aug 2000 03:12:05 +0000 |
| Subject: | RE: [PHP] Alternate row color | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10836@lists.php.net to get a copy of this message | ||
while (conditions) {
if ($color == "#ffffff") $color = "#000000;
else $color = "#ffffff";
print "<tr color=$color></td>\n";
}
-----Original Message-----
From: Tyler Longren [mailto:tyler.longren@midiowa.net]
Sent: Tuesday, August 08, 2000 8:07 PM
To: PHP-General
Subject: [PHP] Alternate row color
Hello,
How could I alternate table row colors by using a for or while loop? It
can't be that hard. I just can't grasp it. I will be gettting the rows
out of a MySQL db, and I want to alternate the colors on a page. Any
examples?
Regards,
--
Tyler Longren
[Web Development]
Premier Visual Services
http://www.pvs2000.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net