Let's say I have a string: something

When I escape it in JS I get this: %73%6F%6D%65%74%68%69%6E%67

so I can use this code in JS to decode it:

 document.write(unescape('%73%6F%6D%65%74%68%69%6E%67'));

I need the escape function in PHP which will do the same (will encode something to : %73%6F%6D%65%74%68%69%6E%67)

How to do that ?

Edit
Report