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:

  1. $string: Required. Specifies the string to be processed.
  2. $charlist: Optional. Specifies the characters to be deleted. Default is a space.

Return value:
Return the processed string.

bannerAds