snipplets.dev/snipplets/code/PHP/in_array.php
2023-08-05 22:45:06 +03:00

11 lines
185 B
PHP

<?php
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo("Got Irix");
}
if (in_array("mac", $os)) {
echo("Got mac");
}
?>