note 96772 deleted from control-structures.if by danbrown
| From: | danbrown@php.net | Date: | Mon, 15 Mar 2010 20:10:49 +0000 |
| Subject: | note 96772 deleted from control-structures.if by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-167070@lists.php.net to get a copy of this message | ||
Note Submitter: ajfweb at googlemail dot com
----
There is a *very* handy feature of if, when you are using large blocks of text, where you can
contain a closing php tag and an opening php tag:
<?php
if($somevar==1){
?>
This text will show up if $somevar is 1.<br />
etc
etc
etc
etc
<?php
}else{
?>
This text will show up if $somevar isn't 1.<br />
etc etc
<?php
}
?>