Created
June 19, 2013 19:47
-
-
Save dhrrgn/5817420 to your computer and use it in GitHub Desktop.
preg_grep_keys() allows you to grep over the keys of an array.
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
<?php | |
function preg_grep_keys($pattern, $input) { | |
return preg_grep($pattern, array_keys($input)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
10/10 confirmed best function; using for production scale application