array_change_key_case_recursive

Custom PHP Function


if (function_exists('array_change_key_case_recursive') === false) { function array_change_key_case_recursive($a, $b = CASE_LOWER) { $c = array(); $d = array_keys($a); $f = ($b == CASE_LOWER) ? 'strtolower' : 'strtoupper'; foreach ($d as $e) { if (is_array($a[$e])) { $c[$f($e)] = array_change_key_case_recursive($a[$e], $b); } else { $c[$f($e)] = $a[$e]; } } return $c; } }