note 108080 added to control-structures.switch

From: Date: Tue, 27 Mar 2012 11:34:17 +0000
Subject: note 108080 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-186837@lists.php.net to get a copy of this message
Switch usage for make some actions with all of cases <?php $out = ' '; for ($i=1;$i<10:$i++) { switch ($i) { case true: $out .= 'test_'; case 1: case 2: case 3: $out .= $i; default: $out .= ' '; } } echo $out; ?> That sample out: " test_1 test_2 test_3 " ---- Server IP: 195.54.192.44 Probable Submitter: 188.65.65.160 ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- https://master.php.net/note/edit/108080 Del: integrated -- https://master.php.net/note/delete/108080/integrated Del: useless -- https://master.php.net/note/delete/108080/useless Del: bad code -- https://master.php.net/note/delete/108080/bad+code Del: spam -- https://master.php.net/note/delete/108080/spam Del: non-english -- https://master.php.net/note/delete/108080/non-english Del: in docs -- https://master.php.net/note/delete/108080/in+docs Del: other reasons-- https://master.php.net/note/delete/108080 Reject -- https://master.php.net/note/reject/108080 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186837) next »