Re: Template Question

From: Date: Sat, 14 Aug 2004 21:29:15 +0000
Subject: Re: Template Question
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-193823@lists.php.net to get a copy of this message
Jonathan Haddad wrote:
eval takes a string and evaluates it as PHP, which I also thought would work. But this is a file of mixed PHP and HTML.
If your file starts off in HTML mode, then: $file = file_get_contents('yourfile.php'); eval('?>'.$file.'<?'); -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#193823) next »