Hello everyone.
I want to implement templates in a site, but am having trouble processing php within the template file. The application flow is as follow: -open the template file (which has some place holders) with $fileHandler = file($file_name) -Replace placeholders (within the template files) with $fileHandler = ereg_replace("--PlaceHolder--","New content",$Handler) //disregard syntax errors... -Then display the content of the modified template $fileHandler = implode('',$fileHandler) echo $fileHandler; The above process works, as far as replace the place holders, and printing the new content (which is an HTML file). However, it will not process PHP scripts, within the template. For example, if my template has <html> ...... <body> <?php> echo "hello!"; ?> <p>blah blah blah </body> </html> the above process will display the PHP code within the HTML file, without processing. How can I process the PHP codes that's in the template? -john =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity Web Developement. Database. Hosting. Multimedia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php