snipplets.dev/snipplets/code/PHP/in_array.php

11 lines
185 B
PHP
Raw Normal View History

2022-04-02 16:57:55 +03:00
<?php
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo("Got Irix");
}
if (in_array("mac", $os)) {
echo("Got mac");
}
?>