<?php
$os = array("Mac", "NT", "Irix", "Linux");
if (in_array("Irix", $os)) {
echo "Got Irix";
}
if (in_array("mac", $os)) {
echo "Got mac";
}?>
The second condition fails because in_array()
is case-sensitive, so the program above will display:
Got Irix
No comments:
Post a Comment