mtrim()
mtrim(string $string) : string
Replace contiguous spaces in a string by a single space.
Leading and trailing spaces are preserved but collapsed to a single space.
Parameters
string | $string | The string to analyze |
Returns
string —Cleaned up string with extra spaces merged