FastTemplate strange Error
| From: | Gustavo Vieira Goncalves Coelho Rios | Date: | Fri, 06 Apr 2001 16:52:20 +0000 |
| Subject: | FastTemplate strange Error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47499@lists.php.net to get a copy of this message | ||
Hi folks, i writing in order to get a simple problem i am facing with
FastTemplate PHP lib.
I am trying to get my template parsed, but when i access the url, i get
an error:
Warning: Undefined property: table in
/usr/home/grios/.public_html/php_inc/FastTemplate.inc on line 376
0 0
1 10
2 20
3 30
4 40
5 50
6 60
7 70
8 80
9 90
Here is my t.php:
<?
require ("FastTemplate.inc");
$tpl = new FastTemplate("tpl");
$tpl->define(array("table" => "t.tpl"));
$tpl->define_dynamic("row", "table");
for ($i = 0; $i < 10; $i++) {
$tpl->assign(array("NUMBER" => $i, "RESULT" => $i * 10));
$tpl->parse("ROWS", ".row");
}
$tpl->parse("MAIN", "table");
$tpl->FastPrint();
?>
Here is my template t.tpl:
<table>
<!-- BEGIN DYNAMIC BLOCK: row -->
<tr>
<td>{NUMBER}</td>
<td>{RESULT}</td>
</tr>
<!-- END DYNAMIC BLOCK: row -->
</table>
Very simple, no? But what is wrong?
May some one in this mailing list help me?