How can I test if a string is URL encoded?
Which of the following approaches is better?
Here is something i just put together.
if ( urlencode(urldecode($data)) === $data){ echo 'string urlencoded'; } else { echo 'string is NOT urlencoded'; }