Created
July 25, 2018 03:32
-
-
Save xrsrke/d7c6dda6c06cea956082ad87ca4cee76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function array_keys_multi(array $array) | |
{ | |
$keys = array(); | |
foreach ($array as $key => $value) { | |
$keys[] = $key; | |
if (is_array($value)) { | |
$keys = array_merge($keys, array_keys_multi($value)); | |
} | |
} | |
return $keys; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment