Skip to content

Instantly share code, notes, and snippets.

@thealscott
Created May 15, 2012 16:49
Show Gist options
  • Save thealscott/2703187 to your computer and use it in GitHub Desktop.
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.
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