Files
smarty/demo/index.php

26 lines
875 B
PHP
Raw Normal View History

<?php
2000-11-15 17:11:52 +00:00
2003-02-03 15:39:47 +00:00
require 'Smarty.class.php';
2001-11-20 21:20:34 +00:00
2000-11-15 17:11:52 +00:00
$smarty = new Smarty;
2003-02-03 15:39:47 +00:00
$smarty->compile_check = true;
$smarty->debugging = true;
2003-02-03 15:39:47 +00:00
$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
$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
2003-02-03 15:39:47 +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
2003-02-03 15:39:47 +00:00
$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
$smarty->assign("option_selected", "NE");
2001-02-07 20:55:39 +00:00
$smarty->display('index.tpl');
2000-11-15 17:11:52 +00:00
?>