Bug #16663 Updated: Different syntax for embedding HTML in PHP

From: Date: Wed, 17 Apr 2002 16:29:13 +0000
Subject: Bug #16663 Updated: Different syntax for embedding HTML in PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5209@lists.php.net to get a copy of this message
ID: 16663 Updated by: bill@bwi.com Reported By: bill@bwi.com Status: Open Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.2.0 New Comment: I can't seem to figure out how to edit the submission, so I can't fix the missing < on <html> Previous Comments: ------------------------------------------------------------------------ [2002-04-17 12:24:55] bill@bwi.com Missed the opening < on <html> ------------------------------------------------------------------------ [2002-04-17 12:18:47] bill@bwi.com The following can be confusing to read: html> <br>This is plain HTML <? echo "<br>This is a PHP Block"; ?> <br>This is raw html text embedded in PHP. <? echo "<br>This is the same outer PHP block"; ?> <br>This is more plain HTML </html> The following is easier to read, at least for me, with a C programming background: html> <br>This is plain HTML <? echo "<br>This is a PHP Block"; HTML { <br>This is raw html text embedded in PHP. } echo "<br>This is the same outer PHP block"; ?> <br>This is more plain HTML </html> This would make HTML a reserved word that would turn off the PHP parser within the following set of braces, or if braces aren't present, until the next semicolon. The advantage of this style is it makes it easier to see the underlying block structure of the PHP code, yet avoids having to use echo or print to output chunks of HTML code. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16663&edit=1

« previous php.bugs (#5209) next »