urlencode($your_string) - This PHP function is encodes a string to be used in a query part of a URL. URL encoding is used when placing text in a query string to avoid it being confused with the URL itself. It is normally used when the browser sends form data to a web server. All non-alphanumerica characters (except hypens, underscores, and periods) are replaced with percentage (%) signs followed by a two-digit hex code.
urldecode($your_string) - This PHP function is decodes the query part of a URL string. URL encoding is used when placing text in a query string to avoid it being confused with the URL itself. It is normally used when the browser sends form data to a web server.