2000-11-15 17:11:52 +00:00
|
|
|
<?
|
|
|
|
|
2001-01-19 16:01:46 +00:00
|
|
|
require("Smarty.class.php");
|
2000-11-15 17:11:52 +00:00
|
|
|
|
|
|
|
$smarty = new Smarty;
|
|
|
|
|
2001-01-31 22:42:05 +00:00
|
|
|
$smarty->caching = false;
|
|
|
|
|
|
|
|
$smarty->assign(now, time());
|
2001-01-31 17:28:10 +00:00
|
|
|
|
2000-11-20 22:31:38 +00:00
|
|
|
$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
|
2000-11-15 17:11:52 +00:00
|
|
|
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
|
|
|
|
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
|
2000-11-19 18:57:06 +00:00
|
|
|
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
|
|
|
|
array("I", "J", "K", "L"), array("M", "N", "O", "P")));
|
2000-11-15 17:11:52 +00:00
|
|
|
|
2001-01-26 15:15:55 +00:00
|
|
|
$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
|
|
|
|
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
|
2001-01-24 17:16:32 +00:00
|
|
|
|
2001-01-31 17:28:10 +00:00
|
|
|
$smarty->assign("now",time());
|
2001-01-24 17:16:32 +00:00
|
|
|
|
2001-01-29 16:36:07 +00:00
|
|
|
$smarty->display("index.tpl");
|
2000-11-15 17:11:52 +00:00
|
|
|
|
2001-01-31 22:42:05 +00:00
|
|
|
function insert_foo($args)
|
|
|
|
{
|
|
|
|
extract($args);
|
|
|
|
|
|
|
|
return "test $arg1";
|
|
|
|
}
|
|
|
|
|
2000-11-15 17:11:52 +00:00
|
|
|
?>
|