rtrim

PHP 4, PHP 5, PHP 7, PHP 8
rtrim - Strip whitespace (or other characters) from the end of a string
Rtrim Online Tool
Manual
Code Examples

Example #1 Usage example of rtrim

Result: string(32) " These are a few words :) ... " string(16) " Example string " string(11) "Hello World" string(30) " These are a few words :) ..." string(26) " These are a few words :)" string(9) "Hello Wor" string(15) " Example string"
PHP Version:


Example #2 of rtrim

PHP Version:


Function rtrim:

Strings Functions

Most used PHP functions