Back to PhocaDownloadUtils class

Method strTrimAll

public static
strTrimAll
(mixed $input)

Method strTrimAll - Source code

public static function strTrimAll($input)
{
    $output = '';
    $input = trim($input);
    for ($i = 0; $i < strlen($input); $i++) {
        if (substr($input, $i, 1) != " ") {
            $output .= trim(substr($input, $i, 1));
        } else {
            $output .= " ";
        }
    }
    return $output;
}