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";
Any workarounds? Can I somehow use preg_match insode in_array to overcome my problem?
Tanks.