Skip to content

Instantly share code, notes, and snippets.

@awrowse
Created September 12, 2012 21:47
Show Gist options
  • Save awrowse/3710170 to your computer and use it in GitHub Desktop.
Save awrowse/3710170 to your computer and use it in GitHub Desktop.
PHP Object Sort Numeric
usort($navItems, function($x, $y){
if ($x->LinkOrder == $y->LinkOrder) { return 0; }
return ($x->LinkOrder < $y->LinkOrder) ? -1 : 1;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment