Re: note 11767 added to echo

From: Date: Tue, 06 Mar 2001 19:20:47 +0000
Subject: Re: note 11767 added to echo
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-11953@lists.php.net to get a copy of this message
The semicolon of the last command is (and has been since at least PHP 3) optional, i.e.: <h1><?php echo $title ?></h1> If you try: $strings = array ("foo", "bar", "boom"); foreach ($strings as $str) echo $str echo "\nKaboom!\n"; You'll get a syntax error, as expected. Will merge your comments and add the bit about the optional semicolon in there. --- slicky@newshelix.com wrote: > That's really weird: > > this works (only tried with 4.04): > > foreach ($strings as $str) > echo $str > > PS:No i haven't forget the ";" > > http://www.php.net/manual/en/function.echo.php > > > -- > PHP Notes Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-notes-unsubscribe@lists.php.net > For additional commands, e-mail: > php-notes-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > ===== --- Jesus M. Castagnetto <jmcastagnetto@php.net> __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

« previous php.notes (#11953) next »