Code Demo for PHP's urlencode and urldecode

URL encode and decode is a very important concept in Web area, follow demo code can help understand how to use two PHP url encode and decode functions

$origUrl = 'http://yiilib.com/topic/633/PHP URLENCODE'; //original url
$encodeUrl = urlencode($origUrl);  //encode to http%3a%2f%2fyiilib.com%2ftopic%2f633%2fPHP+URLENCODE
var_dump($encodeUrl); //http%3a%2f%2fyiilib.com%2ftopic%2f633%2fPHP+URLENCODE

$decodeUrl = urldecode($encodeUrl);//http://yiilib.com/topic/633/PHP URLENCODE
var_dump($decodeName == $origUrl);//compare = true