-----Original Message-----
From: Floyd Resler [mailto:[email protected]]
Sent: Wednesday, April 11, 2012 11:26 AM
To: PHP
Subject: [PHP] Sorting Help
I need to sort the following array:
{
[Smith, Bob]=>array(137.5,125.5),
[Jones, Robert]=>array(132.7,128.2)
}
The array needs to be sorted by the first number (i.e. 137.5) and then the
second in descending order. I looked at array_multisort but couldn't figure
out how to make work for my needs.
Thanks!
Floyd
Here is what I did to your array
$test = array("Smith, Bob"=>array(137.5,125.5),"Jones
Robert"=>array(132.7,128.2));
asort($test);
print_r('<pre>');
print_r($test);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php