note 56293 added to control-structures.switch
| From: | m0oseman at hotmail dot com | Date: | Tue, 30 Aug 2005 04:00:04 +0000 |
| Subject: | note 56293 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94359@lists.php.net to get a copy of this message | ||
I wanted to put conditional formatting in "case" statements, but its not allowed so I just
left out the "break;" statements.
Easy enugh.
switch ($color){
case "RED":
case "LIGHTRED":
echo "red enugh";
break;
case "blue":
case "navy":
echo "blue enugh";
break;
}
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56293
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56293&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56293&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56293&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56293&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56293&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56293&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56293&report=yes
Search -- http://master.php.net/manage/user-notes.php