if array has value in php code example
Example 1: php value in array
in_array ( mixed $needle , array $haystack , bool $strict = false ) : bool
Example 2: in_array php
<?php
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo "Existe Irix";
}
if (in_array("mac", $os)) {
echo "Existe mac";
}
?>