9
inarrayi
in_arrayi
SYNOPSIS
in_arrayi($s, $arr)
DESCRIPTION
in_arrayi returns true if the string of characters $s is in the array $arr.
in_arrayi is case insensitive.
CODE
- function in_arrayi($s, $arr) {
- foreach ($arr as $v) {
- if (strcasecmp($s, $v) == 0) {
- return true;
- }
- }
- return false;
- }
Comments