[snip]I found the following and inserted it into my snippet for alternating backgoriund colors.
However, I'm not sure I understand the logic.
if ($alternate == "1") { $color = "#eaf3da"; $alternate = "2"; } else { $color = "#d5eae9"; $alternate = "1"; }
It's just a long way of alternating colors. When $alternate is one, color1 is set, then $alternate is set to two. The next time through the loop, the color will be set to color2, then $alternate is set back to one. Then the cycle repeats.
-- ---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
PHP|Architect: A magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php