note 110689 added to control-structures.switch
| From: | Vadim dot Romanko at gmaile dot com | Date: | Thu, 22 Nov 2012 21:33:12 +0000 |
| Subject: | note 110689 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192103@lists.php.net to get a copy of this message | ||
Alternative sintax for operator switch:
Random: i is <?= $i=rand(0,5)?> <br>
<?switch($i):default:?> Switch to: default
<?break;case 1:?> Switch to: case 1
<?break;case 2:?> Switch to: case 2
<?break;case 3:?> Switch to: case 3
<?endswitch?> <br>
----
Server IP: 89.251.21.32
Probable Submitter: 89.251.21.33 (proxied: 178.216.18.45)
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- https://master.php.net/note/edit/110689
Del: integrated -- https://master.php.net/note/delete/110689/integrated
Del: useless -- https://master.php.net/note/delete/110689/useless
Del: bad code -- https://master.php.net/note/delete/110689/bad+code
Del: spam -- https://master.php.net/note/delete/110689/spam
Del: non-english -- https://master.php.net/note/delete/110689/non-english
Del: in docs -- https://master.php.net/note/delete/110689/in+docs
Del: other reasons-- https://master.php.net/note/delete/110689
Reject -- https://master.php.net/note/reject/110689
Search -- https://master.php.net/manage/user-notes.php