Explain the difference between urlencode and urldecode?



Explain the difference between urlencode and urldecode?..

Answer / Sarfaraj Khan

urlencode() is a PHP function that encodes a string into a format suitable for use in a URL. It replaces characters such as spaces, certain punctuation marks, and non-ASCII characters with a '%' followed by two hexadecimal digits. urldecode(), on the other hand, is used to decode the data encoded by urlencode(). It decodes the '%' followed by two hexadecimal digits back into its original character.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is strlen php?

1 Answers  


How do you pass a variable by value?

1 Answers  


What does the php error 'parse error in php - unexpected t_variable at line x' means?

1 Answers  


How to execute an sql query? How to fetch its result?

1 Answers  


How can we access the data sent through the url with the get method?

1 Answers  


What is x+ mode in fopen() used for?

1 Answers  


What is the use of callback in php?

1 Answers  


In mail($param1, $param2, $param3, $param4), the $param2 contains__

1 Answers  


What is polymorphism with example in php?

1 Answers  


List some string function name in php?

1 Answers  


How to convert a json string to an array in php?

1 Answers  


How can we change the maximum size of the files to be uploaded?

1 Answers  


Categories