Remove Trailing Slash From String PHP
if(substr($string, -1) == '/') { $string = substr($string, 0, -1) }
Alternative way:
$string = rtrim($string, '/');
Remove Trailing Slash From String PHP
if(substr($string, -1) == '/') { $string = substr($string, 0, -1) }
Alternative way:
$string = rtrim($string, '/');