PHP Example
Screen shot
Search Student Result through Array.

<?php
$message_array=array("Roll No","Name","Math","Enlish","Hindi","Science","Computer");

$result[0]=array(1001,"Ashok",64,8,84,56,34);
$result[1]=array(1002,"Sanjay",44,75,39,56,34);
$result[2]=array(1003,"Vinod",84,78,49,56,35);

?>
<html>
<head>
<title>Find Result through Array</title>
</head>
<body>
<form name="frm" action="" method="post">
Enter the number <input name="roll_no" type="text" /><br>
<input name="button" type="submit" value="Submit">
</form>
<table border="1" width="200">
<?php
if(isset ($_POST['button']))
{
$roll_no=$_POST['roll_no'];
for($i=0;$i<3;$i++)
{
for($j=0;$j<7;$j++)
{
if($result[$i][0]==$roll_no)
{
?>
<tr>
<td><?php echo $message_array[$j]; ?></td>
<td><?php echo $result[$i][$j] ?></td>
</tr>
<?php
}
}
}
}
?>
</table>
</body>
</html>