note 39757 added to function.in-array
| From: | one_eddie at tenbit dot pl | Date: | Mon, 09 Feb 2004 22:16:43 +0000 |
| Subject: | note 39757 added to function.in-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64912@lists.php.net to get a copy of this message | ||
I found no sample with case-insensitive in_array. Here's one i wrote:
function in_array_cin($strItem, $arItems)
{
$bFound = FALSE;
foreach ($arItems as str$Value)
{
if (strtpupper($strItem) == strtoupper($strValue))
$bFound = TRUE;
}
return $bFound;
}
----
Manual Page -- http://www.php.net/manual/en/function.in-array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39757
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39757&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39757&report=yes
Search -- http://master.php.net/manage/user-notes.php