2.5.11. trim()

string trim ( string text [, string characters] )

Returns a string with the specified in characters stripped from the beginning and the end of text. If the character set is not specified, it strips whitechars (spaces, tabs etc.).