how do I sort this 2-D array?
807569Jun 22 2006 — edited Jun 22 2006Hi there,
I have a two-dimensional array that I'm trying to sort by a particular column, but for any given element in a column, I want it's corresponding row elements to go with it when it moves...for example:
[1,36,76,9]
[2,98,45,6]
[3,87,32,14]
[4,34,12,5]
[5,56,27,23]
Now, I want the above array to look like this:
[4,34,12,5]
[1,36,76,9]
[5,56,27,23]
[3,87,32,14]
[2,98,45,6]
Any ideas? I'm quite new and this problem is plaguing me and has been holding me back for some time now.
Thanks,
jjmclell