PHP urldecode

 Continuing the urlencode encoding from the previous article , this article explains URL decoding. urldecode can be used to decode urlencode encoded strings. If part of the encoding of the URL is not decoded, the webpage may not be opened correctly in the URL bar of the browser, although some parameters may not have such problems.


PHP urldecode syntax example

string urldecode (the string to be decoded or the entire URL);


urlencode can recompile and decode the encoded percent sign% or number, and the plus sign (+) will be decoded as a space.

PHP urldecode implementation example
<?php
 $url='http%3A%2F%2Fwww.wibibi.com';
 echo urldecode($url);
?>
Output result:

The $url prepared at the beginning of the http://www.wibibi.com example is a URL compiled through urlencode. This example decodes it through urldecode and restores it to the original URL!

Post a Comment

0 Comments