<?
define ('PATH', dirname(__FILE__));
define ('GZIP', FALSE);
require_once "tpl.php"; // Template driver
require_once "dcc.php"; // Content Caching routines
$tpl = new dcc("example", "other");
if ($tpl->cache_start()) {
$vars = array(
'var1' => "Variable 1 Replaced from array OK",
'var2' => "Variable 2 Replaced from array OK",
);
$tpl->assign($vars);
$tpl->assign('var3', "Variable 3 Replaced OK");
$table_rows = array();
$table_rows[] = array(
'id' => '1',
'first_name' => 'John',
'surname' => 'Smith'
);
$table_rows[] = array(
'id' => '2',
'first_name' => 'Bill',
'surname' => 'Jones'
);
$table_rows[] = array(
'id' => '3',
'first_name' => 'Tom',
'surname' => 'Robins'
);
$tpl->assign("table_rows");
$tpl->assign("template_head");
$tpl->assign("template_side");
$tpl->cache_stop();
}
$tpl->done();
?>
|