i have some urls
www.amazon.com/
www.digg.com
www.microsoft.com/
etc. i want to remove the trailing slash. so not just the last character. is there a trim or rtrim for this? or something fast?
i have some urls
www.amazon.com/
www.digg.com
www.microsoft.com/
etc. i want to remove the trailing slash. so not just the last character. is there a trim or rtrim for this? or something fast?
You put rtrim in your answer, why not just look it up?
$url = rtrim($url,"/");
As a side note, look up any PHP function by doing the following:
$urls="www.amazon.com/ www.digg.com/ www.microsoft.com/";
echo preg_replace("/\b\//","",$urls);