Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How to decode the url in php where url is encoded with encodeURIComponent()?
I have tried the urldecode() but then also..i don't the url which i have encoded...
I have to do this in php..
You should use rawurldecode(). See the Manual
rawurldecode()
Add a comment
you can use this function:
<?php $string = 'http%3A%2F%2Fexample.com'; $output = preg_replace("/%u([0-9a-f]{3,4})/i","&#x\\1;",urldecode($string)); echo html_entity_decode($output,null,'UTF-8'); ?>
output will be : http://example.com
http://example.com
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.