Hi
I'm having problems getting my script which uses Fast Template working.
I get these errors:
Warning: Undefined property: table in class.FastTemplate.php on line 373
Warning: Undefined property: ROWS in class.FastTemplate.php on line 299
Line 373:
if( (!$this->$ParentTag) or (empty($this->$ParentTag)) )
Line 299:
$this->$ReturnVar .= $this->parse_template($this->$val,$this->PARSEVARS);
The code i am using is:
<?php
require "class.FastTemplate.php";
$tpl = new FastTemplate(".");
$tpl->define(array ("template" => "template.tpl",
"table" => "table.tpl"));
$tpl->define_dynamic("row", "table");
for($i = 0; $i < 16; $i++) {
$result = pow(2, $i);
$tpl->assign(array(
"EXPONENT" => $i,
"RESULT" => $result
));
$tpl->parse("ROWS", ".row");
}
$tpl->parse("CONTENT", array("template", "table"));
$tpl->FastPrint();
?>
The rest of the files are at:
http://www.andyuk.net/php/
The script seems to trip up at the parse function.
By the way, i am using PHP4 and i have escaped the {} characters.
Hope you can help,
Andy