PHP rtrim() function is used to remove the user-defined text or whitespaces from the right side of a string. The return type of this function is a string.
$string is a PHP string from which we want to remove either some predefined texts or white space used by this function. It is mandatory.












