Advertisement
Vangar

uksort() to order highest to lowest number, and alphabetical

Aug 19th, 2012
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.19 KB | None | 0 0
  1.     private function splitsort($a, $b) {
  2.     $key1 = explode("-", $a);
  3.     $key2 = explode("-", $b);
  4.     if ($key1[0] != $key2[0])
  5.         return $key2[0] - $key1[0];
  6.     return strcmp($a, $b);
  7.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement