urldecode

(PHP 3, PHP 4, PHP 5)

urldecode -- 解碼已編碼的 URL 字串

描述

string urldecode ( string str )

解碼給出的已編碼字串中的任何 %##。返回解碼後的字串。

例子 1. urldecode() example

<?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()