trim

(PHP 3, PHP 4 >= 4.0b1)

trim --  Strip whitespace from the beginning and end of a string

Description

string trim (string str)

This function returns a string with whitespace stripped from the beginning and end of str. The whitespace characters it currently strips are: "\n", "\r", "\t", "\v", "\0", and a plain space.

See also chop(), rtrim() and ltrim().