Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting multidim arrays

Status
Not open for further replies.

sirugo

Programmer
Joined
Aug 1, 2000
Messages
162
Location
SE
I have an multidimensional array.

Lets' say its elements are:

h 1 r 9
a 3 d 4
c 2 f 5
b 9 g 8

How can I sort it, keeping the values on the "same row"?
Let's say I want to sort it with the first column as sort-value:

a 3 d 4
b 9 g 8
c 2 f 5
h 1 r 9

or the third column:

a 3 d 4
c 2 f 5
b 9 g 8
h 1 r 9
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top