note 93128 modified in control-structures.switch by danbrown
| From: | danbrown@php.net | Date: | Tue, 25 Aug 2009 01:05:29 +0000 |
| Subject: | note 93128 modified in control-structures.switch by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-159852@lists.php.net to get a copy of this message | ||
Purely by accident I stumbled across the fact that you can also use operators in each case statement
- EG:
<?php
switch($Mode)
{
case "open" OR "view":
//Do something here.
break;
}
?>
--was--
Purely by accident I stumbled across the fact that you can also use operators in each case statement
- EG:
<?
switch($Mode)
{
case "open" OR "view":
//Do something here.
break;
}
?>
http://php.net/manual/en/control-structures.switch.php