note 11767 modified in echo by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Tue, 06 Mar 2001 19:21:04 +0000 |
| Subject: | note 11767 modified in echo by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11954@lists.php.net to get a copy of this message | ||
[Editor's note: the semicolon on the last command of a script container has been always
optional (at least since PHP 3), and it is usually useful when embedding PHP code in HTML]
That's really weird:
this works (only tried with 4.04):
foreach ($strings as $str)
echo $str
PS:No i haven't forget the ";"
[And later the note's contributor added]
slicky@newshelix.com
06-Mar-2001 08:38am
Only works if that was your last instruction in your code!!
So for instance if you have
<?
echo "Hello";
echo "World"
?>
this would work!
I don't know if that is a really advantage for you. Well it might be in
case of
<?echo $str?> ,but due the much easier variant of putting the variable
into something like this <?=Hello_World?> , it won't be.
http://www.php.net/manual/echo.php