note 15652 deleted from function.in-array by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 21:08:15 +0000 |
| Subject: | note 15652 deleted from function.in-array by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-21978@lists.php.net to get a copy of this message | ||
Note that the function in_array() is case-sensitive and searches for whole strings only.
Therefore, if you search the array
$haystack = array("first", "second", "third");
using
$result = in_array($needle, $haystack);
you will get a TRUE $result for
$needle = "first";
$needle = "second";
$needle = "third";
but a FALSE $result for
$needle = "First";
$needle = "sec";
$needle = "ird";
This is right for the function search_array() as well.