Renich
public php v1 · immutablefunction sort_array($array){ if ( is_array($array) ) { foreach ($array as $key => $data) { // Sort the rest of the levels by key if ( is_array($data) ) { ksort($array[$key]); } else { // Sort the 1st level by key asort($array); } } } // Regresar datos ordenados return $array;}