I have a string:
$fonts = "Arial:400";
When I use that in a URL, the colon prints as %3A. How can I escape the colon so that it prints as :? I have tried preg_replace and urlencode with no luck. I'm sure its simple but I have searched.
:
You should be using urlencode and substitute the %3a with :
$url = urlencode($url); $url = str_replace("%3A",":",$url);
1.4m articles
1.4m replys
5 comments
57.0k users