note 53980 added to language.basic-syntax
| From: | mfyahya at gmail dot com | Date: | Mon, 20 Jun 2005 08:15:34 +0000 |
| Subject: | note 53980 added to language.basic-syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90664@lists.php.net to get a copy of this message | ||
I came across this slightly weird behaviour when embedding php inside html comment tags
<!-- start comment
<? for ($i=0; $i<3; $i++) ?>
end comment -->
<? echo 'blah'; ?>
will output:
<!-- comment
end comment -->
blah
ie you won't get 'end comment -->' or even 'blah' printed 3 times as you
might expect
but if you do
<!-- start comment
<? for ($i=0; $i<3; $i++) { ?>
end comment -->
<? echo 'blah'; } ?>
you'll get:
end comment -->
blahend comment -->
blahend comment -->
blah
which isn't what you probably want either
----
Manual Page -- http://www.php.net/manual/en/language.basic-syntax.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53980
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53980&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53980&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53980&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53980&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+53980&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53980&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53980&report=yes
Search -- http://master.php.net/manage/user-notes.php