fdusautoir,
il y a 13 ans
la fonction rtrim te permettra de réaliser cela.
Exemple :
<?php
$str = 'http://www.site.fr/';
$str = rtrim($str,'/');
echo $str;
// Affiche : http://www.site.fr
?>