$value) { $content[$key] = addslashes(trim($value)); if (preg_match($pattern, $content[$key])) { echo $content[$key]; $content[$key] = ''; } } } else { $content = addslashes(trim($content)); if (preg_match($pattern, $content)) { $content = ''; } } return $content; }