Re: RES: [PHP] array loops

From: Date: Fri, 01 Dec 2000 17:59:25 +0000
Subject: Re: RES: [PHP] array loops
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-28223@lists.php.net to get a copy of this message
Hi there, You may also try something like this: $bgcolors = Array(); $bgcolors[] = "#FFFFFF"; $bgcolors[] = "#CCCCCC"; $dim = sizeof(arr); for ($nr = 0; $nr < $dim; $nr++) { echo "<TD BGCOLOR=\"" . $bgcolors[($nr & 1)] . ">" . $arr[$nr] . "</TD>\n"; } Regards, Jason -- Jason Murray Developer jWeb New Media Design 1 877 525 jWEB

« previous php.general (#28223) next »