$url = $_post['url']; if $url is like http://www.google.com then i am trying to convert it to http://www.google.com/ . So basically trying to add a trailing slash if not present. Thank you.