| 
<?php
/*
 * this is an example with tabular data like data from a database; it is passed as multidimensional array where:
 * in the 1st level are given the tags to be replaced.
 * in the 2nd level the values.
 */
 
 /*
 * template processor
 */
 require('class_template.php');
 $page = new Page("row.html");
 
 for($i=0;$i<=3;$i++){
 $id[] = $i;
 }
 
 /*
 * here we go; replace all placeholders
 */
 $page->replace_tags(array(
 'id' => $id
 ,'name' => array('john','mary','susy','bob')
 , 'age' => array('22','45','67','89')
 ), 'loop');
 
 $page->output('ISO-8859-15');
 ?>
 |