PHP chop() function is used to remove whitespace from the end of a string.
Syntax
Parameter | Description |
---|---|
str : | Required parameter. A string or text. |
charlist : | Optional parameter. Characters to be remove from the string. |
Return Value : | Returns the modified string. |