Theres in_array() function, which finds occurences, but I havent used it.
Heres a little snippet which you can use to search through array:
while (list ($key, $val) = each ($test)) {
if (strstr($val,$searchstring))
{
echo "$searchstring found in key: $key";
}
}