problems sorting an associative array...
| From: | Ben Rigby | Date: | Mon, 13 Aug 2001 19:20:46 +0000 |
| Subject: | problems sorting an associative array... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-62480@lists.php.net to get a copy of this message | ||
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["test@email.com"]=1;
$email_array["test2@email.com"]=4;
$email_array["test3@email.com"]=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