Hi all,
I need to sort a two-dimensional array by a column of the second dimension.
Sample array:
$array = array(
array("peach","yellow","02"),
array("apple","green", "11"),
array("gauva","pink", "04"));
I want to sort the 2nd dimension arrays by the third column, which contains an id number. Is array_multisort the proper function to use? How do I use array_multisort to achieve my goal? Or is there another way to do this?
I am expecting that array_multisort should produce an array that looks like this:
$array = array(
array("peach","yellow","02"),
array("gauva","pink", "04"),
array("apple","green", "11"));
Thanks for your help; I haven't had much success parsing the documentation on how to do this.
Cheers...Michael.