note 113902 added to control-structures.alternative-syntax

From: Date: Mon, 16 Dec 2013 00:54:14 +0000
Subject: note 113902 added to control-structures.alternative-syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-197944@lists.php.net to get a copy of this message
The reason for the "workaround" jeremiah mentioned, in the case of the switch statement, can be understood as follows; in any place where you can have an echo statement (an if block, a switch's case, whatever), that's where you can have the raw HTML. In PHP this basically gets handled just like that -- like an echo statement. In between a switch and a case, though, you can't echo anything. By placing the switch and the case in two separate blocks of PHP, with a raw HTML newline echo'ed in between them, PHP basically had to try to find where that statement would be. And it can't be there, hence the difficulty. ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/control-structures.alternative-syntax.php Edit -- https://master.php.net/note/edit/113902 Del: integrated -- https://master.php.net/note/delete/113902/integrated Del: useless -- https://master.php.net/note/delete/113902/useless Del: bad code -- https://master.php.net/note/delete/113902/bad+code Del: spam -- https://master.php.net/note/delete/113902/spam Del: non-english -- https://master.php.net/note/delete/113902/non-english Del: in docs -- https://master.php.net/note/delete/113902/in+docs Del: other reasons-- https://master.php.net/note/delete/113902 Reject -- https://master.php.net/note/reject/113902 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197944) next »