Guest User

Untitled

a guest
Jul 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. public function sortList($by) {
  2.        
  3.             function cmp($a, $b) use ($by) {
  4.                
  5.                
  6.                 if ($a[$by] == $b[$by]) {
  7.                     return 0;
  8.                 }
  9.                 return ($a[$by] < $b[$by]) ? -1 : 1;
  10.             }
  11.            
  12.             usort($this->list, "cmp");
  13.         }
Add Comment
Please, Sign In to add comment