hash - PHP encode/decode string only numbers and characters -


i know php function encode() , decode(), work me, want pass encoded string inside url, encode return special chars "=" "," "'" etc....

this break script, best way encode string , numbers , characters?

should use special hash?

there urlencode() , urldecode() method respects special characters.

furthermore, rawurlencode() , rawurldecode() provided encode according rfc-3986. return string in non-alphanumeric characters have been replaced percent (%) sign followed 2 hexadecimal digits.