note 123317 added to control-structures.switch
| From: | andrey dot majoroff at gmail dot com | Date: | Thu, 08 Nov 2018 10:26:39 +0000 |
| Subject: | note 123317 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-209643@lists.php.net to get a copy of this message | ||
Is switch/case working only with echo?
why it can't do something like this:
switch ($e)
{
case 1:
$v = 100;
case 2:
$v = 200;
}
or maybe another code but not only echo or print. Thanks.
----
Server IP: 208.43.231.9
Probable Submitter: 92.113.207.100
----
Manual Page -- http://php.net/manual/en/control-structures.switch.php
Edit -- https://master.php.net/note/edit/123317
Del: integrated -- https://master.php.net/note/delete/123317/integrated
Del: useless -- https://master.php.net/note/delete/123317/useless
Del: bad code -- https://master.php.net/note/delete/123317/bad+code
Del: spam -- https://master.php.net/note/delete/123317/spam
Del: non-english -- https://master.php.net/note/delete/123317/non-english
Del: in docs -- https://master.php.net/note/delete/123317/in+docs
Del: other reasons-- https://master.php.net/note/delete/123317
Reject -- https://master.php.net/note/reject/123317
Search -- https://master.php.net/manage/user-notes.php