PHP Example
Screen shot
To Select Letter from dropdown and print array element.

<?php
if(isset($_POST['btnsubmit']))
{

$a_name=array("Amit","Anil","Ajay","Atul");
$b_name=array("Benu","Brijesh","Bipul");
$c_name=array("Charu","Chadan","Chandu");

if($_POST["personname"]=='A')
foreach($a_name as $value)
echo $value."<br>";

if($_POST["personname"]=='B')
foreach($b_name as $value)
echo $value."<br>";

if($_POST["personname"]=='C')
foreach($c_name as $value)
echo $value."<br>";

}
?>
<html>
<head>
<title>My array</title>
</head>
<body>
<form name="frm" action="" method="post">
<select name="personname">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
<input name="btnsubmit" type="submit" value="Submit">
</form>
</body>
</html>

You can download source code here