programming-examples/php/String/PHP script to remove trailing slash from a string.php

4 lines
102 B
PHP
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<?php
$my_str = 'The quick brown fox jumps over the lazy dog///';
echo rtrim($my_str, '/')."\n";
?>