Created
May 15, 2012 16:49
-
-
Save thealscott/2703187 to your computer and use it in GitHub Desktop.
Returns if the key of an array exists and equals the given value.
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 key_exists_and_equals($array, $key, $value) | |
{ | |
return (isset($array[$key]) && $array[$key] == $value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment