urldecode()
If you have a string with characters encoded for a url, this function will get them back.
Normally if we had something in the query string we’d simply use $_GET and not have to worry about the encoding. Sometimes, though, we do things differently.
Suppose for example, we don’t have variables in the query string, just one value. Something like
http://example.com/page?username
One easy way to access that value is by using the whole query string. But remember, that value must have been url encoded.
/* Assume the url to be http://example.com/page?me+%26+my+arrow */ $str = $_SERVER['QUERY_STRING']; // me+%26+my+arrow $value = urldecode( $str ); // me & my arrow
See the manual entry for urldecode()
