The trim function strips whitespace (or other characters) from the beginning and end of a string.

    
    $text = "\t\tThese are a few words :) ...  ";

    $textTrimmed = trim($text);

    echo $textTrimmed;
    // These are a few words :) ...