I'm getting a strange error from fasttemplate, when trying to do dynamic rows in a template. This is a very basic example that comes with the class. I've tried downloading other versions of the class without avail. The only thing I can think of is a disparity with php3 and php4. I'm getting the following warning from fasttemplate:
Warning: Undefined property: ROWS in c:\program files\apache group\apache\htdocs\classes\class.FastTemplate.php3 on line 304
here is the code:
<?php
require "./class.FastTemplate.php3";
$tpl = new FastTemplate("../templates");
$tpl->define(array(
"row" => "row.tpl",
"table" => "table.tpl"
));
for ($i = 0; $i < 16; $i++) {
$result = pow(2, $i);
$tpl->assign(array(
"NUMBER" => $i,
"BIG_NUMBER" => $i + 1,
"LINK" => $result
));
$tpl->parse("ROWS", ".row");
}
$tpl->parse("CONTENT", "table");
$tpl->FastPrint();
?>
the templates are simple:
<!-- NAME: table.tpl -->
<table bgcolor="#ffffff"> <!-- border=0 cellpadding=0 cellspacing=0 -->
{ROWS}
</table>
<!-- END: table.tpl -->
<!-- NAME: row.tpl -->
<tr valign="top">
<td>{NUMBER}</td>
<td>{BIG_NUMBER}</td>
<td>{LINK}</td>
</tr>
<!-- END: row.tpl -->
any help would be appreciated.
-Jon