bool in_array (mixed needle, array haystack [, bool strict])
Searches the haystack for needle and returns TRUE if found, FALSE otherwise.
If the value of the third parameter strict is TRUE, the in_array() function will also check whether the type of needle is the same as that in haystack.
Note: If needle is a string, the comparison is case-sensitive.
Note: Prior to PHP version 4.2.0, needle was not allowed to be an array.
Example 1. in_array() example
$os = array ("Mac", "NT", "Irix", "Linux");
if (in_array ("Irix", $os)) {
print "Got Irix";
}
if (in_array ("mac", $os)) {
print "Got mac";
}