ob_start <> eval?
| From: | blackwater dev | Date: | Thu, 05 Jul 2007 22:52:13 +0000 |
| Subject: | ob_start <> eval? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-258371@lists.php.net to get a copy of this message | ||
I have a template system that takes some data, scrubs it and then with a
load method includes the required template. I need to add a param so it
doesn't simply include but returns the contents of the template in a string
with all of the vars populated. I tried:
ob_start();
include my template
$template=ob_get_contents();
ob_clean();
return $template;
But this returns the template it's it's raw for with all of tha
<?=$whatever?> tags. Can I fill these in and still pass as another var
without using eval()?
What do other template systems to do return a template as a string on load?
Thanks!