Back to PhocacartUtils class

Method StripHiddenChars

public static
StripHiddenChars
(mixed $str)

Method StripHiddenChars - Source code

public static function StripHiddenChars($str)
{
    $chars = array("\r\n", "\n", "\r", "\t", "\x00", "\v", "\xef", "\xbb", "\xbf");
    $str = str_replace($chars, " ", $str);
    return preg_replace('/\\s+/', ' ', $str);
}