source: branches/comu-ver2/data/module/Smarty/demo/index.php @ 15532

Revision 15532, 882 bytes checked in by nanasess, 14 years ago (diff)

svn:mime-type 修正

  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2
3require '../libs/Smarty.class.php';
4
5$smarty = new Smarty;
6
7$smarty->compile_check = true;
8$smarty->debugging = true;
9
10$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
11$smarty->assign("FirstName",array("John","Mary","James","Henry"));
12$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
13$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
14      array("I", "J", "K", "L"), array("M", "N", "O", "P")));
15
16$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
17      array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
18
19$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
20$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
21$smarty->assign("option_selected", "NE");
22
23$smarty->display('index.tpl');
24
25?>
Note: See TracBrowser for help on using the repository browser.