What is the equivalent of JavaScript's decodeURIcomponent in PHP?

Omar picture Omar · Oct 9, 2010 · Viewed 36.5k times · Source

I have a string with unicode characters that I am transferring via HTTP. This string was encoded with Javascript's encodeURIcomponent(). Is there an equivalent function in php to Javascript's decodeURIComponent()?

Answer

Explosion Pills picture Explosion Pills · Oct 9, 2010
urldecode()

However you do not need to use it on $_REQUEST variables, which are already decoded automatically.