I have this array
Array
(
[data] => Array
(
[0] => Array
(
[id] => 1293005125
[viewed] => TRUE
[active] => TRUE
[time] => December 22, 2010 13:00 hours
[timestamp] => 1293006034
[initial_timestamp] => 1293005125
[user] => administrator
)
[1] => Array
(
[mid] => 1293001908
[viewed] => TRUE
[active] => TRUE
[time] => December 22, 2010 13:00 hours
[timestamp] => 1293001908
[initial_timestamp] => 1293001908
[user] => administrator
)
[2] => Array
(
[mid] => 1293009999
[viewed] => TRUE
[active] => TRUE
[time] => December 22, 2010 13:00 hours
[timestamp] => 1293009999
[initial_timestamp] => 1293009999
[user] => administrator
)
[3] => Array
(
[mid] => 1293006666
[viewed] => TRUE
[active] => TRUE
[time] => December 22, 2010 13:00 hours
[timestamp] => 1293006666
[initial_timestamp] => 1293006666
[user] => administrator
)
[4] => Array
(
[mid] => 1293005125
[viewed] => TRUE
[active] => TRUE
[time] => December 22, 2010 13:00 hours
[timestamp] => 1293006125
[initial_timestamp] => 1293005125
[user] => administrator2
)
)
Now I would like to sort this array by [mid]
How do I do this?
Currently I sort this in a foreach loop
There has to be a better way
EDIT
I hoped to output something like
[mid] key => array value
Thanks
No comments:
Post a Comment