parsing a file to a variable?

From: Date: Tue, 20 Jun 2000 00:07:08 +0000
Subject: parsing a file to a variable?
Groups: php.general 
Request: Send a blank email to php-general+get-2258@lists.php.net to get a copy of this message
How would I take an external file containing html and php, parse it and assign it to a variable? Something a long the lines of: template.php: <table border=1> <tr> <td><?=$var?></td> </tr> </table> execute.php: $var = 1; $parsed = parse("template.php"); I don't want to include() the file. I want the parsed file in a variable. What I'm doing: I'm trying to create a template system along the lines of XTemplate, but want to allow php code inside the templates. Any ideas? Charles

« previous php.general (#2258) next »