Is it possible to remove the trailing slash / from a string using PHP?
/
This removes trailing slashes:
$str = rtrim($str, '/');