Re: if... then... else with HTML
| From: | Geir Eivind Mork | Date: | Mon, 23 Apr 2001 12:47:17 +0000 |
| Subject: | Re: if... then... else with HTML | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49840@lists.php.net to get a copy of this message | ||
On Monday 23 April 2001 14:41, Martin Thoma wrote:
if ($word != "flat") {
echo <<<OUT
lot of crap with "'s and stories about your mom
OUT;
} else {
echo <<<OUT
do the same
OUT;
}
remember not to have anything before or after OUT (or whatever other text you
use instead of OUT) or you get prase errors.
Or the html/php switiching way, a fraction slower after my tests :)
<?if ($world != "flat") {?>
html
<?} else {?>
html
<?]?>
--
php developer / CoreTrek AS | I judge a religion as being good or bad
Sandnes / Rogaland / Norway | based on whether its adherents become
web: http://www.moijk.net/ | better people as a result
of practicing