in_array value code example
Example 1: php in array
$colors = array("red", "blue", "green");
if (in_array("red", $colors)) {
echo "found red in array";
}
Example 2: check null in_array php
if (!empty($data_days) && in_array(1, $data_days, true)){ // use numeric value 1, not string
Example 3: in_array
<?
in_array("Irix", $os);
?>