Re: Building page based on request?
| From: | Jon Parise | Date: | Mon, 10 Jul 2000 18:51:01 +0000 |
| Subject: | Re: Building page based on request? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5782@lists.php.net to get a copy of this message | ||
On Mon, Jul 10, 2000 at 06:00:07PM +0100, Emile Axelrad wrote:
> > <?
> > if (isset($content)
> >
> > echo "<? include ($content) ?>";
> > }
> > ?>
>
> How about:
> <?
> if ($content) {
> include ("$content");
> }
> ?>
Even better:
<?php
if (!isset($content) || empty($content)) $content = 'some_default';
include $content;
?>
--
Jon Parise (jon@csh.rit.edu) . Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/ : Computer Science House
Member