TypeError thrown

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