I'm having trouble finding a function to sort a multidimensional array by
the value of a given key in the contained arrays. Perhaps i'm missing
something, perhaps PHP is missing something.
Take the array below. All I'm looking to do is reorder $my_array based on
the value of the "name" key for example--to order $my_array based on the
alphabetical order of the "names".
$my_array = array (
array ("name"=>"Sam", "age"=>"20", married="yes"),
array ("name"=>"Alice", "age"=>"25", married="no"),
array ("name"=>"Jim", "age"=>"19", married="no"),
array ("name"=>"Janice", "age"=>"22", married="yes")
);
Am I missing something that already exists?
-Rick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]