Possible Duplicate:
php sort array by sub-value
I have a multidimensional array like the following:
Array => (
[0] => Array(
[a] => abcd,
[b] => 22
),
[1] => Array(
[a] => defg,
[b] => 12
),
.....
)
I want to sort this array by the value of the index b in the internal arrays. If I want to sort it descending then the example is now in okay. But if I want to sort in ascending way the expected output will be:
Array => (
[0] => Array(
[a] => defg,
[b] => 12
),
[1] => Array(
[a] => abcd,
[b] => 22
),
.....
)
Thanks!