I have some URLs, like www.amazon.com/, www.digg.com or www.microsoft.com/ and I want to remove the trailing slash, if it exists, so not j
www.amazon.com/
www.digg.com
www.microsoft.com/
You put rtrim in your answer, why not just look it up?
rtrim
$url = rtrim($url,"/");
As a side note, look up any PHP function by doing the following:
(rtrim stands for 'Right trim')