View Single Post
Old 10-06-2005, 10:16 PM   #5 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
If this were perl, it'd be a job for the Schwartzian Transform, but it's not so it depends on your data.

If the numbers you have are unique, you can build an array that has the field to sort on as the keys, and the rows of data as the values, sort the numbers and then iterate over the array of sorted numbers as keys to the array, pulling out the now sorted data.

There are a few implementations of this here . Otherwise you may have to add a decimal place or something to each number to ensure the keys are unique.
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote