I have 2D array that contains sets of last names and birth dates. I'm attempting to look for a last name and birth date combo match within the array, but I'm not too sure how to do that.
So, the array to search would look something like this:
Array (
[0] => Array (
[0] => lastName1
[1] => 05/24/1937
)
[1] => Array (
[0] => lastName2
[1] => 06/05/1932
)
[2] => Array (
[0] => lastName3
[1] => 03/04/1926
)
)
My user would supply the search criteria of $lastName and $dateOfBirth
So for example, say my user enters $lastName = "lastName2" and $dateOfBirth = "06/05/1932" I would like to search the main array and see if there is an exact match and return true if there is a match or false if there is no match.
In this case it should return true since Array # 1 is an exact match to both of the search criteria given.
So far I know how to search the array for one value at a time but I need to search for both values at the same time since there may be several array items with the same last name or birth date, but matching the combo of both should in most cases only return one result if any at all.