Possible Duplicate:
Dirt-simple PHP templates… can this work withouteval?
Let’s say I have a text file called template.tpl. The contents of template.tpl is:
<html>
<body>This is a variable: {$variable}</body>
</html>
Is there a way for PHP to render template.tpl as a PHP file and then understand that {$variable} should be processed as <?php echo $variable; ?>?
Pretty much trivial with output buffering.