Revision: 14488
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at June 5, 2009 07:51 by iloveitaly
Initial Code
// this function processes a URL that 'should' be a full url (http://something.com/dfsdfs/) // and makes sure it contains the correct format to be included into a href attribute function processURLString($urlString) { $urlString = trim($urlString); if($urlString) { $urlString = preg_replace('/https?:\/\//', '', $urlString); $urlString = trim($urlString); $urlString = 'http://'.$urlString; } return $urlString; }
Initial URL
Initial Description
this function processes a URL that 'should' be a full url (i.e. http://something.com/dfsdfs/) and makes sure it contains http:// for easy inclusion as a link into a href attribute
Initial Title
Standardize URL String
Initial Tags
url, http, format
Initial Language
PHP