Getting an include file into a string after PHP evaluates the vars?

From: Date: Tue, 29 Jan 2002 23:51:41 +0000
Subject: Getting an include file into a string after PHP evaluates the vars?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82624@lists.php.net to get a copy of this message
I'm using templates to create an interface for a new ePostcard script. The templates are HTML with embedded PHP tags in the likely positions (ie. font, text, bgcolor, etc..). The script include()'s the chosen template file and evaluates the variables stored in the active session for display in the browser. I don't know why I didn't think of this ahead of time but in order to produce the HTML-based ePostcard email I have to get the evaluated template into a string. I can fopen() the template file and read it into a string but the PHP won't evaluate. And since most of the template is HTML with some Javascript of course eval() won't work on the string. Did I paint myself into a corner here? Or is there a way out that I just don't see. Thanks, Kevin Stone kevin@helpelf.com www.helpelf.com

« previous php.general (#82624) next »