Re: Comment modes behavior in HTML and PHP
| From: | Paul Novitski | Date: | Sat, 28 Jul 2007 14:19:02 +0000 |
| Subject: | Re: Comment modes behavior in HTML and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-259742@lists.php.net to get a copy of this message | ||
At 7/28/2007 07:40 AM, C.R.Vegelin wrote:
I have a PHP script, as follows: <!-- <?php<!-- ... --> is an HTML comment. /* ... */ and //... are PHP comments. The HTML comment syntax does not affect PHP, and PHP comment syntax does not affect HTML. http://www.php.net/manual/en/language.basic-syntax.comments.php Regards, Paul __________________________ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.comecho "should this be echoed ?";?> --> As expected, the browser shows nothing, but when I view Source in the browser, I see: <!-- start HTML comment should this be echoed ?--> Shouldn't it be just: <!-- -->, without the echo result ?I don't expect PHP to be active between <!-- -->.