Problem with Searching data from array or variable

Hello,
We can search data from database but i want to search data from a array or from a variable. I have a staff file with their details in a array or in a variable. I have 3 staffs and i want to store everyones data in array and i want to search them by their position from their array data store.

Example:
$name=“Antu”;
$position=“Staff”;

$name=“Faruk”;
$position=“Client”;

$name=“Abdullah”;
position=“Staff”;

now i want to search my all staffs details from that variable or array. How can i do it ?

<?php
/* This would be the data from the database table */
$records = array( 0 => array("name" => "Antu", "position" => "Staff"),
	 1 => array( "name" => "Faruk", "position" => "Client"),
	 2 => array( "name" => "Abdullah", "position" => "Staff")
);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Search by Staff</title>
</head>
<body>
<?php
	foreach($records as $record) {
		foreach($record as $key => $value) {
			/* Instead of 'Staff' this would come from a html form, for example $position = $_POST['position'] */
			if ( $value == 'Staff' ) {
				echo "<h1>" . $record['name'] . ' is a ' . $record['position'] . ' member<br>' . "</h1>\n";
			}
		}
	}
?>
</body>
</html>

Hey @Pepster Thanks a lot but i want to search. Means suppose there are three staffs and their name is
Abdullah Al Mamun
Abdullah Al Faruk
Faruk Antu

Now i want to search by name. Suppose i want to know how much people in my company with the name Abdullah so how i can do that ? Which we can make simple in Database but how can in this way ? can you please help me ? It will be great help for me Sir.

That would probably require regex and I’m far from an expert, someone else here probably could help with this better than I could.