|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
abuijze Smarty n00b
Joined: 08 Mar 2005 Posts: 1 Location: Netherlands / The Hague
|
Posted: Tue Mar 08, 2005 9:39 pm Post subject: Assigning output to a variable |
|
|
I was looking fo a way to assign the output the display function to a variable. I couldn't find it, but I foud a workaround. If anyone is interested:
Code: | ob_start();
$smarty->display("template.tpl");
$var = ob_get_contents();
ob_clean();
|
the information is not sent to the browser, but assigned to the variable $var instead. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|