Possible Duplicate:
Sort an array by a child array's value in PHP
I have the following array structure:
$en_array = array();
while(...) {
$en_array[] = $row;
}
$en_array = array (
array (
"name" => "a",
"followers" => 5,
"imageurl" => "http://images.com/img.jpg"
)
array (
"name" => "b",
"followers" => 25,
"imageurl" => "http://images.com/img.jpg"
)
array (
"name" => "c",
"followers" => 15,
"imageurl" => "http://images.com/img.jpg"
)
)
In this example I would like to order the keys of en array by the values of followers, e.g. $en_array[0]["followers"]
would have the value of 25
.
I'm not entirely sure if this can be done, but I hope it can.
Any help will be much appreciated :)!!