perhaps asort()? "This function sorts an array such that array indices maintain their correlation with the array elements they are associated with."
--- Diana Castillo <[EMAIL PROTECTED]> wrote: > Hi , I am trying to sort this: > array[numrooms] => Array ( [3] => 2 [2] => 5 [1] => 1 ) > I want to get a result like this: > 2=>5 > 3=>2 > 1=>1 > ( I want the keys to stay attached to the results) > > I used this to sort it : > array_multisort ($request_array['numrooms'], SORT_NUMERIC, > SORT_DESC); > > but instead I get this: > [numrooms] => Array ( [0] => 5 [1] => 2 [2] => 1 ) > > any suggestionis? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== Mark Weinstock [EMAIL PROTECTED] *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *************************************** __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php