Last active
August 29, 2015 14:18
-
-
Save dellow/a76046da126273f099fc to your computer and use it in GitHub Desktop.
Case insensitive in_array().
This file contains hidden or 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
/** | |
* in_arrayi | |
* Case insensitive in_array(). | |
* | |
* @since 1.0.0 | |
* @version 1.0.0 | |
**/ | |
function in_arrayi($needle, $haystack){ | |
return in_array(strtolower($needle), array_map('strtolower', $haystack)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment