Remove characters from the right side of a string:

Started by KingSparta, Dec 16, 2023, 02:20 PM

Previous topic - Next topic

KingSparta

Remove characters from the right side of a string:

<?php
$str = "Hello World!";
echo $str . "<br>";
echo rtrim($str,"World!");
?>