View Single Post
  #4  
Old 01-07-2011, 11:59 PM
kingcj kingcj is offline
Registered User
kingcj's Avatar
Join Date: Apr 2006
Location: TN
Posts: 114
kingcj will become famous soon enough
Send a message via MSN to kingcj
Quote:
Originally Posted by WhiteDragon View Post
Uh, this works for sortascending?
Way 1
Store the number in a subvariable for each item in the array, then use sortbyvalue:
PHP Code:
temp.xs = {1,6,7,3,2,1,5,23,41,75,2347,51,123};

for (
temp.0temp.temp.xs.size(); temp.i++) {
  
temp.xs[temp.i].blah temp.xs[temp.i];
}
temp.xs.sortbyvalue("blah""float"true); 
This worked for me, but I'm unsure why the .blah was needed when assigning. I'm not sure if the other is for GUIs or not, but thanks for the help!
__________________
Zie

"It is not necessary to change. Survival is not mandatory." - W. Edwards Deming
Reply With Quote