|
in_arrayChecks if a value exists in an array Description
bool in_array
( mixed
$needle
, array $haystack
[, bool $strict = FALSE
] )
Searches Parameters
Return Values
Returns Examples
Example #1 in_array example
<?php The second condition fails because in_array is case-sensitive, so the program above will display: Got Irix
Example #2 in_array with strict example
<?php The above example will output: 1.13 found with strict check
Example #3 in_array with an array as needle
<?php The above example will output: 'ph' was found 'o' was found See Also
|