Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gcphost/e5faee1abb607844bcf0 to your computer and use it in GitHub Desktop.

Select an option

Save gcphost/e5faee1abb607844bcf0 to your computer and use it in GitHub Desktop.
private function array_keys_multi(array $array)
{
$results = [];
foreach ($array as $key => $value) {
if (is_array($value)) {
$results = array_merge($results, [$key => array_merge(array_keys($value),$this->array_keys_multi($value))]);
}
}
return $results;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment