Re: Subject: Creating an Associative Array

From: Date: Thu, 09 Jun 2005 13:43:05 +0000
Subject: Re: Subject: Creating an Associative Array
Groups: php.db 
Request: Send a blank email to php-db+get-39630@lists.php.net to get a copy of this message
Thank you kindly, Neil Smith and Brent Baisley. I now see the error of my approach. --------------------------------------------------------------------------------------------------------------- $dateArray = array(); > for($counter = 0; $counter <= 3600; $counter++) > { > $dateArray[ date("Y.m.d H:i:s", $now - $counter) ] = > (int)ceil(980 - ($counter * .2333333333333))); > } --------------------------------------------------------------------------------------------------------------- works just fine. note: Brent, the array(3601) was coming from the $counter loop above and is the seconds in an hour plus one ( for aesthetic reasons ). David

« previous php.db (#39630) next »