Home > Archive > PHP Smarty Templates > March 2004 > Re: [SMARTY] dynamic template
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [SMARTY] dynamic template
|
|
|
| It can do all kind of jazz, for example I use PEAR:DB with Smarty and
end up with scripts such as:
$smarty->assign(array("data" => $db->getAll("SELECT * FROM some_table"),
"time" => stopTiming());
$smarty->display("index.html",$dataHandler->getCacheID());
works like a charm ;)
Alex
Simon Benjamin wrote:
> Hello,
>
> Smarty work dynamic templates? (data from DB, PHP)
>
> ----- code -----
> ... // get data from db
> $db->FetchRow($template); // template data (string!)
>
> $SM->display($template); // ?
> ----- code -----
>
> or works only "static" files?
>
> thx
>
| |
|
|
|
|
|