Invalid argument supplied for foreach() in /usr/lib/php/HTML/IT.php on line 424
| From: | Torsten Rosenberger | Date: | Tue, 22 Jan 2002 12:50:40 +0000 |
| Subject: | Invalid argument supplied for foreach() in /usr/lib/php/HTML/IT.php on line 424 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-686@lists.php.net to get a copy of this message | ||
Hello
i tried ITX and addBlockfile
but i get this error when trie with block(innerblock)
in the file i load with addBlockfile.
The template looks like this
index.html
---------------------------
html
head
title{TITLE}/title
head
{OUTSIDE}
/html
tabl.html
---------------------------
table border=1
<!-- BEGIN tr -->
tr
<!-- BEGIN td -->
td
{TEXT}
/td
<!-- END td -->
/tr
<!-- END tr -->
/table
Now my php script
---------------------------
include("HTML/ITX.php");
$tpl = new IntegratedTemplateExtension( "templates/");
$tpl->loadTemplatefile("index.html",true,true);
$tpl->setVariable( "TITLE", "test");
$tpl->addBlockfile("OUTSIDE", "tab", "tabl.html");
$tpl->setCurrentBlock("td") ;
$tpl->setVariable("TEXT", "$i");
$tpl->parseCurrentBlock("td");
$tpl->setCurrentBlock("start_tr");
$tpl->parseCurrentBlock("start_tr");
Maybe there are other solutions or an example.
Best Regards
Torsten