note 15622 added to control-structures.switch
| From: | te at unkelhaeuser dot de | Date: | Sun, 23 Sep 2001 23:55:29 +0000 |
| Subject: | note 15622 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18223@lists.php.net to get a copy of this message | ||
Is there an equal to the
if ($a == "hello" || $a == "hi") { .. }
for the switch statement? I tried things like this, but without the hoped success:
switch ($a)
{
...
case "hello" || "hi":
..
break;
...
}
--
http://www.php.net/manual/en/control-structures.switch.php
http://master.php.net/manage/user-notes.php?action=edit+15622
http://master.php.net/manage/user-notes.php?action=delete+15622
http://master.php.net/manage/user-notes.php?action=reject+15622