note 51179 added to control-structures.switch
| From: | BrunoFeu at osu1 dot php dot net | Date: | Tue, 22 Mar 2005 21:22:23 +0000 |
| Subject: | note 51179 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-86805@lists.php.net to get a copy of this message | ||
You can solve the problem by just writing the following piece of code:
<?php
$x = 18;
$y = 6;
switch ($x) {
case ($y * 4):
case (9 * 3):
echo "Member";
break;
default:
echo "Not a member";
}
?>
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+51179
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51179&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51179&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51179&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51179&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51179&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+51179&report=yes
Search -- http://master.php.net/manage/user-notes.php