figured it out.
i had to use:
array_multisort ($email_array,SORT_DESC);
thanks,
    ben

Ben Rigby wrote:

> hi.
> any help would be mych appreciated!
> i'm trying to sort an associative array, but when i do, the key is
> converted into a number (it should be a string). ie:
>
> $email_array["[EMAIL PROTECTED]"]=1;
> $email_array["[EMAIL PROTECTED]"]=4;
> $email_array["[EMAIL PROTECTED]"]=10;
> rsort ($email_array);
>
> i'm trying to sort by the value and then echo out the key and value
> together, but when i do, the key is always a number, rather than the
> email address that i wanted. any ideas??
>
> thanks,
>     ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to