sorting an array

From: Date: Tue, 17 Jun 2003 16:14:50 +0000
Subject: sorting an array
Groups: php.general 
Request: Send a blank email to php-general+get-151856@lists.php.net to get a copy of this message
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?

« previous php.general (#151856) next »