TypeError thrown

preg_match(): Argument #2 ($subject) must be of type string, array given