<?php $region=$_POST['zone']; $x=$_POST['id']; $teams = array( "North"=>array( "Bdale", "Raiders", "Itasca", "Wood Dale","Carol Stream" ), "South"=>array( "Lakers", "Patriots", "Arsenal" ) ); print(" You requested Zone $region and id $x :"); print("---".$teams[$region][$x]); echo "<br>You have following teams<br>"; foreach ($teams[$region] as $key=>$value) {print("$key and $value<br>");} ?> <html>
<head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Pass ref of a varaiable</title> </head>
<body text="#FFFF00" bgcolor="#000080">
<pre> <form action="multi_dimension.php" method="post"> Enter Zone <input type=text name="zone"> Enter Team ID <input type=text name="id"> <input type="submit" value="click"></form> </pre> </body></html>
|