<?php $names_array[0] = array('first' => 'John', 'last' => 'Parker'); $names_array[1] = array('first' => 'Matt', 'last' => 'Timmons'); $names_array[2] = array('first' => 'Joe', 'last' => 'Shmoe'); $names_array[3] = array('first' => 'Fred', 'last' => 'Hamilton'); require_once 'BTS.php'; $tpl = new BTS(); $tpl->assign('title', "Here's a List of names, with cycling tr bgcolors:"); $tpl->assign('names', $names_array); $out = $tpl->display('tpl3.tpl', 1); echo $out;
<?php require_once 'BTS.php'; $tpl = new BTS(); $tpl->assign('title', 'Welcome to my web site'); $tpl->display('tpl1.tpl');
<?php $name_array = array('first' => 'bill', 'last' => 'shupp'); require_once 'BTS.php'; $tpl = new BTS(); $tpl->assign('title', 'Welcome to my web site'); $tpl->assign('name', $name_array); $tpl->display('tpl2.tpl');
<?php $names_array[0] = 'bill'; $names_array[1] = 'shupp'; $names_array[2] = 'bob'; $names_array[3] = 'jones'; require_once 'BTS.php'; $tpl = new BTS(); $tpl->assign('title', "Here's a List of names, with cycling tr bgcolors:"); $tpl->assign('names', $names_array); $tpl->assign('name_selected', 'shupp'); $out = $tpl->display('tpl4.tpl', 1); echo $out;