Hi all,
I'm having difficulty finding information on how to sort my 2-dimensional array by one column contained in the 2nd dimension. I have tried to use array_multisort, but can't figure out the syntax. I want this sample array:
$array = array(
array("fred" "4"),
array("jim" "2"),
array("lenny" "1"),
array("manny" "9"));
to be sorted so as to produce an array like this:
$array = array(
array("lenny" "1"),
array("jim" "2"),
array("fred" "4"),
array("manny" "9"));
So the second column of the second dimension (the id number) will determine the order. How do you specify this with array_multisort, or is there another (better?) way to do this.
Cheers...Michael.