Sorting an array
| From: | John Nichel | Date: | Wed, 02 Jun 2004 16:59:39 +0000 |
| Subject: | Sorting an array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187462@lists.php.net to get a copy of this message | ||
Okay, I know someone is going to shoot me for asking such a dumb question, but I just can't seem to find the answer anywhere. I have a multidimensional array which I would like to sort on the value of one of the keys...
Array
(
[0] => Array
(
[foo] => blah
[bar] => blah
[sort] => 5
)
[1] => Array
(
[foo] => blah
[bar] => blah
[sort] => 2
)
[2] => Array
(
[foo] => blah
[bar] => blah
[sort] => 4
)
[3] => Array
(
[foo] => blah
[bar] => blah
[sort] => 3
)
[4] => Array
(
[foo] => blah
[bar] => blah
[sort] => 1
)
)
What I would like to do is sort this on the value of 'sort' in each sub-array. What am I missing???? TIA
--
John C. Nichel
KegWorks.com
716.856.9675
john@kegworks.com