PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/framework/vendor/smarty3/lib/demo/index.php

http://zoop.googlecode.com/
PHP | 27 lines | 18 code | 8 blank | 1 comment | 0 complexity | de36819357b554a2b6609c1a72eedf2d MD5 | raw file
 1<?php
 2require('../libs/Smarty.class.php');
 3
 4$smarty = new Smarty;
 5
 6
 7
 8//$smarty->force_compile = true;
 9$smarty->debugging = true;
10$smarty->caching = true;
11$smarty->cache_lifetime = 120;
12
13$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill",true);
14$smarty->assign("FirstName",array("John","Mary","James","Henry"));
15$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
16$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
17	  array("I", "J", "K", "L"), array("M", "N", "O", "P")));
18
19$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
20	  array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
21
22$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
23$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
24$smarty->assign("option_selected", "NE");
25
26$smarty->display('index.tpl');
27?>