Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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";
}
?>

Source by www.php.net #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+9 =