Forum und email

urldecode

(PHP 4, PHP 5)

urldecode — URL 인코드 문자열을 디코드합니다.

설명

string urldecode ( string $str )

주어진 문자열의 %## 인코딩을 디코드합니다. 디코드한 문자열을 반환합니다.

Example#1 urldecode() 예제

<?php
$a 
explode('&'$QUERY_STRING);
$i 0;
while (
$i count($a)) {
    
$b split('='$a[$i]);
    echo 
'Value for parameter 'htmlspecialchars(urldecode($b[0])),
         
' is 'htmlspecialchars(urldecode($b[1])), "<br />\n";
    
$i++;
}
?>

참고: urlencode(), rawurlencode(), rawurldecode().