<?php
require ('../tplTemplatez.php');
// arrays with data
$array = array(
array('value' => 'value1', 'caption' => 'caption1'),
array('value' => 'value2', 'caption' => 'caption2'),
array('value' => 'value3', 'caption' => 'caption3'),
);
// load template
$tpl = new tplTemplatez('nested.tpl');
for($i=0;$i<6;$i++){
// parsing for nested checkbox block
foreach ($array as $k => $v) {
$tpl->tplParse($v, 'ROW/row_checkbox'); // parse nested
}
$tpl->tplSetNested('ROW/row_checkbox'); // call it after parsing nested block
$tpl->tplParse('','ROW'); // parse main dinamic block
}
$tpl->tplPrint(); // print the result
?>
|