src/Support/Arr.php
/**
	 * Recursively sort an array by keys and values.
	 *
	 * @param array $array
	 * @return array
	 */
Recursively sort an array by keys and values.
Recursively sort an array by keys and values .
public static function sortRecursive($array) {
		foreach ($array as &$value) {
			if (is_array($value)) {
				$value = static::sortRecursive($value);
			}
		}
		if (static::isAssoc($array)) {
			ksort($array);
		}
		else {
			sort($array);
		}
		return $array;
	}
public static function sortRecursive ( $ array ) { foreach ( $ array as & $ value ) { if ( is_array ( $ value ) ) { $ value = static :: sortRecursive ( $ value ) ; } } if ( static :: isAssoc ( $ array ) ) { ksort ( $ array ) ; } else { sort ( $ array ) ; } return $ array ; }
Recursively sort an array by keys and values.
Recursively sort an array by keys and values .