Re: [PHP] ++Alternate Colors From: James Atkinson (james.atkinson <email protected>)
Date: 09/27/00

On Wed, 27 Sep 2000, Yurais Fernandez Leal wrote:
> Any good/easy way to Alternate Row Colors ?
>
for($x = 0; $x <$numRows; $x++) {
        if(!($x % 2))
                $color = "#FFFFFF";
        else
                $color = "#000000";
        echo "<TR BGCOLOR=\"$color\"><TD>Row $x</TD></TR>";
}

That'll do it...

-- 
James Atkinson
-----------------------------------------------------------------
James Atkinson				100world
Technical Developer			512-1529 West 6th Avenue
phone: +1-604-637-8122			Vancouver, BC, V6J 1R1
fax:   +1-604-742-1770			Canada
email: james.atkinson <email protected>	http://www.100world.com

+---------------------------------------------------------------+ | This message may contain confidential and/or privileged | | information. If you are not the addressee or authorized to | | receive this for the addressee, you must not use, copy, | | discolse or take any action based on this message or any | | information herein. If you have received this message in | | error, please advise the sender immediately by reply e-mail | | and delete this message. Thank you for you cooperation | +---------------------------------------------------------------+

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>