Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 200004

Re: [PHP4BETA] A (Hopefully) simple question *gulp* From: php4 <email protected>
Date: 04/27/00

Addressed to: Andreas Pour <pour <email protected>>
              php4beta <email protected>

** Reply to note from Andreas Pour <pour <email protected>> 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 ++;

   }
 

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>