RE: [PHP] Building page based on request?

From: Date: Mon, 10 Jul 2000 17:00:07 +0000
Subject: RE: [PHP] Building page based on request?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5757@lists.php.net to get a copy of this message
> <? > if (isset($content) > > echo "<? include ($content) ?>"; > } > ?> > How about: <? if ($content) { include ("$content"); } ?> a) Include the first opening curly-parenthesis indicative of the if-execution b) Put the variable in quotes. Do not have it as $"content" - PHP parses variables even within quotes c) Do not have it echo the include. It is a PHP command. d) if ($content) would probably do what you want better. If you wanted to keep isset, then make sure you close it off again i.e. if (isset($content)) { - Emile Axelrad

« previous php.general (#5757) next »