hi, all, i got this trouble for a few hours.
below is my code:
index.html
<!-- BEGIN block1 -->
{vars}
<!-- END block1 -->
<!-- BEGIN block2 -->
{vars2}
<!-- END block2 -->
index.php
<?php
inclue "template.inc";
$t->new Template("./");
$t->set_file("index","index.html");
$t->set_block("index", "block1", "rows");
$t->set_block("index", "block2", "rows2");
// block1's loop
$i = 0;
while($i<10){
$t->set_var(array("vars" => $i));
$t->parse("rows","block1",true);
$i++;
}
$j = 0;
while($j<10){
$t->set_var(array("vars2" => $j));
$t->parse("rows2","block2",true);
$j++;
}
$t->parse("output","index");
$t->p("output");
?>
it's no problem in one loop condition.
no.1 loop can display, but no.2 shows nothing, or can't show its vars.
I want to know how to CODE in multi loop blocks..
Thanks, any one can tell me why??😕 🙁 🙁