Possible Duplicate:
How do I sort a multidimensional array in php
I have value array and want to sort the value based on alphabetical order
my current array
$original_array = array(
array('id' => 123456, 'name'=>michael),
array('id' => 222222, 'name'=>harolds),
array('id' => 1111111, 'name'=>albert)
);
so the result I looking is after sort the array as shown below
$original_array = array(
array('id' => 1111111, 'name' => albert),
array('id' => 222222, 'name' => harolds),
array('id' => 123456, 'name' => michael)
);
It is very easy, just do it like this:
and you will get what you need! If your php version is 5.2.x or less, do it in this way:
Read manual for following functions: