Possible Duplicate:
Problem when loading php file into variable (Load result of php code instead of the code as a string)
I am trying to create a template based application and I am having issues writing the user data into a pre-existing template file.
I would initially use file_get_contents('template.php');
and template.php would contain the following:
echo $user;
Is there anyway to insert data into a placeholder variable in a template file using file_get_contents
?
I suppose I could use DomDocument or regex to insert the data into a placeholder string, but would this be possible to do with a php variable?