×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Jorge Alcalá
Added: Oct 5, 2018 6:56 PM
Views: 3452
  1. $this->regiones[$claUbicacion] = array('nomUbicacion' => $nomUbicacion, 'cantidad' => 10);  
  2.     uasort($this->regiones, $this->build_sorter('cantidad'));
  3.     function build_sorter($key) {
  4.         return function ($a, $b) use ($key) {
  5.             return $b[$key] - $a[$key];
  6.         };
  7.     }