add alternative array_key_first for older verisons of PHP
This commit is contained in:
parent
b7c5d29e39
commit
8d46b4f299
|
|
@ -2194,4 +2194,14 @@ function number_pad($number,$n) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
//add alternative array_key_first for older verisons of PHP
|
||||
if (!function_exists('array_key_first')) {
|
||||
function array_key_first(array $arr) {
|
||||
foreach($arr as $key => $unused) {
|
||||
return $key;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue