Re: [SMARTY] dynamic template
| From: | Alex | Date: | Mon, 15 Mar 2004 01:53:22 +0000 |
| Subject: | Re: [SMARTY] dynamic template | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11121@lists.php.net to get a copy of this message | ||
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