note 105408 deleted from control-structures.switch by danbrown

From: Date: Wed, 17 Aug 2011 15:39:04 +0000
Subject: note 105408 deleted from control-structures.switch by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182543@lists.php.net to get a copy of this message
Note Submitter: damncabbage at gmail dot com ---- A quick note: ending "case ..." with ";" appears to work. $a = 'foo'; switch($a) { case 'bar'; echo 'Stopped at bar.'; break; case 'foo'; echo 'Stopped at foo.'; break; default; echo 'Fell to default.'; } This is a "Well, that's interesting" note; not an encouragement to actually use this.

« previous php.notes (#182543) next »