note 37239 added to control-structures.switch
| From: | larsaioflux at rn2 dot php dot net | Date: | Fri, 07 Nov 2003 10:10:45 +0000 |
| Subject: | note 37239 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60064@lists.php.net to get a copy of this message | ||
The integer passed to switch could be easily remedied by doing:
<?php
$bug = 0;
switch ("$bug")
{
case "hello":
echo "Bug!";
break;
default:
echo "No bug";
}
?>
It's untested, but it should work ;)
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37239
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37239&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37239&report=yes
Search -- http://master.php.net/manage/user-notes.php