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.
Sorting an multidimensional array
Moderator: General Moderators
-
skallagrimur
- Forum Newbie
- Posts: 9
- Joined: Fri Nov 12, 2010 4:33 am
Re: Sorting an multidimensional array
You can use array_multisort or usort. One of those will probably make more sense to you than the other.