note 80494 deleted from faq.html by felipe

From: Date: Tue, 22 Apr 2008 01:03:30 +0000
Subject: note 80494 deleted from faq.html by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-138633@lists.php.net to get a copy of this message
Note Submitter: CraquePipe ---- You can also stop and start PHP interpreting anywhere in the script (as long as it doesn't get in the way of the PHP syntax). Example: <?php // $Comment=true; if(isset($Comment)) { ?> The $Comment variable exists! <b>:D</b><br /> HTML or text can be printed here, anything here will not be parsed as PHP unless you redeclare the PHP start tag: <b>&lt;?php ...</b> <?php } else { ?> The $Comment variable doesn't exist. <b>:(</b><br /> Same again, you can add anything in here, maybe even a whole HTML page..? <b>:O</b> <?php } ?> I'm not quite clear on which versions it works with, It's tested on PHP5 so I'm not too sure of the previous versions. Hope someone can find use with this, instead of echo'ing tonnes of HTML data. CP.

« previous php.notes (#138633) next »