Switch statement
Dotan Cohen
dotancohen at gmail.com
Mon Dec 12 17:47:25 UTC 2005
I have no problem using the switch statement when I am checking if a
variable equals a known number, like such:
<?php
switch ($hour) {
case 0:
echo "Go to sleep.";
break;
case 10:
echo "Good morning.";
break;
case 22:
echo "Good night.";
break;
}
?>
However, how do I do it if the variable is larger than a certain
number? For instance, I want to say "Good night" if $hour is greater
than 22?
Thanks in advance.
Dotan Cohen
http://lyricslist.com/lyrics/biography/327/martin_ricky.php
Martin, Ricky Song Lyrics and Biography
More information about the fedora-list
mailing list