Page 1 of 1

Sorting an multidimensional array

Posted: Fri Nov 12, 2010 5:44 pm
by skallagrimur
Hello,

I got a 2-dimensional array. I'm trying to sort it. Say I have:
MyArrays[j][k], where j={0,1,..,n} and k={0,1,..,n}.

Is it difficult to explain to me how I would go about sorting by say the k=3 array.
I hope I am making myself clear.

All help appreciated. Thanks.

Re: Sorting an multidimensional array

Posted: Fri Nov 12, 2010 9:55 pm
by requinix
You can use array_multisort or usort. One of those will probably make more sense to you than the other.