Answers for "php not in_array example"

PHP
3

in_array

<?php
/**
in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] ) : bool
*/

$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
    echo "Got Irix";
}
if (in_array("mac", $os)) {
    echo "Got mac";
}
?>
Posted by: Guest on May-14-2020
6

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";
}
?>
Posted by: Guest on May-09-2020

Browse Popular Code Answers by Language