nested echo and includes, mixed html / PHP
| From: | Jaxon | Date: | Mon, 19 Feb 2001 23:16:07 +0000 |
| Subject: | nested echo and includes, mixed html / PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40665@lists.php.net to get a copy of this message | ||
Hi PHPers!
I'm doing a simple page build by:
- reading file.html into $string
- reading variables into $array
and then:
echo (strtr($string, $array);
The file.html held in $string contains some PHP <?php include("file.inc") ?>
and file.inc also has some PHP <?php echo("this is inside file.inc)"; ?>
I'm doing this to assemble the page via little 'modules'.
This is not working, e.g. the PHP in $string is not getting parsed by PHP
before being output to the browser, although I DO see the PHP in the
resultant page source...any ideas?
Any comments welcome!
regards,
jaxon