note 92028 added to control-structures.switch
| From: | Anonymous at osu1 dot php dot net | Date: | Mon, 06 Jul 2009 10:41:53 +0000 |
| Subject: | note 92028 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157955@lists.php.net to get a copy of this message | ||
<?php
switch($beer)
{
case 'tuborg';
case 'carlsberg';
case 'heineken';
echo 'Good choice';
break;
default;
echo 'Please make a new selection...';
break;
}
?>
There is an error here. It must be replace by:
<?php
switch($beer)
{
case 'Leffe';
case 'Killian';
case 'Guiness';
echo 'Good choice';
break;
default;
echo 'Please make a new selection...';
break;
}
?>
----
Server IP: 62.2.182.223
Probable Submitter: 213.173.160.97
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- https://master.php.net/note/edit/92028
Del: integrated -- https://master.php.net/note/delete/92028/integrated
Del: useless -- https://master.php.net/note/delete/92028/useless
Del: bad code -- https://master.php.net/note/delete/92028/bad+code
Del: spam -- https://master.php.net/note/delete/92028/spam
Del: non-english -- https://master.php.net/note/delete/92028/non-english
Del: in docs -- https://master.php.net/note/delete/92028/in+docs
Del: other reasons-- https://master.php.net/note/delete/92028
Reject -- https://master.php.net/note/reject/92028
Search -- https://master.php.net/manage/user-notes.php