Skip to content

Instantly share code, notes, and snippets.

@ScrambledBits
Created February 2, 2014 01:27
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ScrambledBits/8761761 to your computer and use it in GitHub Desktop.
Save ScrambledBits/8761761 to your computer and use it in GitHub Desktop.
<?php
function array_keys_multi(array $array)
{
$keys = array();
foreach ($array as $key => $value) {
$keys[] = $key;
if (is_array($array[$key])) {
$keys = array_merge($keys, array_keys_multi($array[$key]));
}
}
return $keys;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment