Thread: Sorting
View Single Post
  #18  
Old 11-22-2009, 03:58 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
PHP Code:
public function getTopAbyss(){
  
temp.guilds getGuildList();
  for (
i=0i<temp.guilds.size(); i++) {
    
temp.guilds[i].kills this.guilds.(@temp.guilds[i]).kills;
  }
  
temp.guilds.sortbyvalue("kills"nulltrue);
  echo(
temp.guilds);

Jer, I think you were a little messed up with your loop and setting the variable as temp.g.kills, because based off what Chris posted you need to save it as a subvariable in the array, though I've never used array.sortbyvalue() before.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote