Skip to content

Instantly share code, notes, and snippets.

@betweenbrain
Created September 4, 2013 18:25
Show Gist options
  • Save betweenbrain/6440817 to your computer and use it in GitHub Desktop.
Save betweenbrain/6440817 to your computer and use it in GitHub Desktop.
PHP usort anonymous function alphabetize
usort($this->item->tags, function ($a, $b) {
return strcmp(strtolower($a->name), strtolower($b->name));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment