PHP rtrim() Function Explained
The PHP rtrim() function is used to remove any trailing spaces or specified characters from the end of a string.
Syntax:
string rtrim(string $string, string $charlist)
Parameters:
- $string: Required. Specifies the string to be processed.
- $charlist: Optional. Specifies the characters to be deleted. Default is a space.
Return value:
Return the processed string.