Don't use array_push - simply set the value:
    $image_array[$file_name] = $image_url;

----- Original Message -----
From: "Leif K-Brooks" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to