note 9355 added to echo
| From: | wls at wwco dot com | Date: | Sat, 28 Oct 2000 19:49:10 +0000 |
| Subject: | note 9355 added to echo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7162@lists.php.net to get a copy of this message | ||
You can also do conditional printing.
<? if ( expr ) : ?>
non-escaped HTML goes here for as
long as you like.
<? endif; ?>
The if/elseif/else/endif notation is
first described at http://www.zend.com/manual/migration-if-endif.php
Additionally, you can also use "here-doc" printing (see Strings in the Type section):
<?
print <<< END
unescaped HTML goes here for
as long as you want.
END;
?>
http://www.php.net/manual/function.echo.php