The PHP function rtrim is used to remove white space from the end of the string.
Let's check the following example to understand how this function actually works
<?php $string = 'Welcome to America '; echo strlen($string); // Outputs: 23 $rtrim_str = rtrim($string); echo strlen($rtrim_str); // Outputs: 18 ?>0 0
Please Login to Post the answer