Bug #16663: Different syntax for embedding HTML in PHP

From: Date: Wed, 17 Apr 2002 16:18:48 +0000
Subject: Bug #16663: Different syntax for embedding HTML in PHP
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5207@lists.php.net to get a copy of this message
From: bill@bwi.com Operating system: Linux PHP version: 4.2.0 PHP Bug Type: Feature/Change Request Bug description: Different syntax for embedding HTML in PHP 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 bug report at http://bugs.php.net/?id=16663&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16663&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16663&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16663&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16663&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16663&r=support Expected behavior: http://bugs.php.net/fix.php?id=16663&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16663&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16663&r=submittedtwice

« previous php.bugs (#5207) next »