Re: [PHP4BETA] A (Hopefully) simple question *gulp*
| From: | php4 at developersdesk dot com | Date: | Thu, 27 Apr 2000 23:38:26 +0000 |
| Subject: | Re: [PHP4BETA] A (Hopefully) simple question *gulp* | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14133@lists.php.net to get a copy of this message | ||
Addressed to: Andreas Pour <pour@mieterra.com>
php4beta@lists.php.net
** Reply to note from Andreas Pour <pour@mieterra.com> Thu, 27 Apr 2000 23:25:38 -0400
>
> John Steele wrote:
>
>
> > Here's another simple way to let the colors do the work.
And another...
$Colors = array( "#ffffff", "#E1DAC1" );
while... {
echo( 'BGColor = "' . $Colors[ $I % 2 ] . '"' );
$I ++;
}
=====================================================================
And if you have more than two colors and don't know how many when you
write the program...
$Colors = array( "#ffffff", "#E1DAC1", "#ffffc0", "#ffc0ff"
] );
while... {
echo( 'BGColor = "' . $Colors[ $I % count( $Colors ) ] . '"' );
$I ++;
}