$attr = Array (
Array ("n001", "Han"),
Array ("n002", "Hui"),
Array ("n003", "Miao"),
Array ("n004", "Uighur"),
);
1. Require a drop-down list of styles to be displayed on the page
2. Requires a Checkbox/radio list to be displayed on the page
1. Require a drop-down list of styles to be displayed on the page
1<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">2"http://www.w3.org/1999/xhtml">34<meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/>5<title> database drop-down menu </title>67 8<body>9 Ten<SelectSize="1"> One A<?PHP -$attr =Array ( -Array"n001","Han"), theArray"n002","Hui"), -Array"n003","Hmong"), -Array"n004","Uighur"), - ); + foreach($attr as$v) - { +Echo"<option>{$v [0]}{$v [1]}</option>"; A } at - -?> - - -</body> inShow Results:
2. Requires a Checkbox/radio list to be displayed on the page
1<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">2"http://www.w3.org/1999/xhtml">34<meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/>5<title> Database check box </title>6 78 9<body>Ten One<?PHP A$attr =Array ( -Array"n001","Han"), -Array"n002","Hui"), theArray"n003","Hmong"), -Array"n004","Uighur"), - ); - foreach($attr as$v) + { -Echo"<input type=checkbox>{$v [0]}{$v [1]}.<br>"; + } A at?> -</body> -Show Results:
Jobs:------Database drop-down menu, database check box