This is a forum topic for discussing the article "Trimming PHP Strings":

http://www.elated.com/articles/trimming-php-strings/

Explains PHP's trim(), ltrim() and rtrim() functions for removing unwanted characters from the beginning and/or end of a string.