Re: Creating associative array

From: Date: Wed, 05 Feb 2003 16:15:04 +0000
Subject: Re: Creating associative array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-134431@lists.php.net to get a copy of this message
Don't use array_push - simply set the value: $image_array[$file_name] = $image_url; ----- Original Message ----- From: "Leif K-Brooks" <eurleif@buyer-brokerage.com> To: "PHP" <php@sheridan-phoenix.com> Cc: <php-general@lists.php.net> Sent: Wednesday, February 05, 2003 1:28 PM Subject: Re: [PHP] Creating associative array > Try: > $image_array = array(); > $image_array[$file_name] = $image_url; > > PHP wrote: > > >I am trying to create associative array in a while loop.. > > > > $image_array = array(); > > $image_array = array_push("$file_name"=>"$image_url"); > > > >what i am doing wrong?????? > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#134431) next »