private function findValue($subject, $array) { foreach ($array as $key => $value) { if (preg_match('/' . $key . '/', $subject)) { return $key; } } }