<?php
/* array declaration */
$districts = array(0 => "Lamjung", 1 => "Gorkha", 2 => "Kaski");
/* display all the districts */
echo "Display all districts <br />";
foreach ($districts AS $district) {
echo "{$district}<br />";
}
echo "<br /> <br />Display one district <br />";
/* display one*/
echo $districts[0];
?>
Categories:
PHP