figured it out!

From: Date: Mon, 13 Aug 2001 19:25:36 +0000
Subject: figured it out!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62482@lists.php.net to get a copy of this message
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["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

« previous php.general (#62482) next »