Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make smarty's display function return to a variable

Tags:

php

smarty

In smarty is it possible or is there any kind of function to render a template and return the result?

for example:

$rendered_content = $smarty->render("content.html")
like image 737
user327396 Avatar asked May 11 '10 00:05

user327396


1 Answers

Yeah there is,

$rendered_content = $smarty->fetch("content.html");
like image 91
user327396 Avatar answered Nov 04 '22 17:11

user327396