note 34280 added to function.urldecode
| From: | tomas at penajaca dot com dot br | Date: | Mon, 21 Jul 2003 04:14:13 +0000 |
| Subject: | note 34280 added to function.urldecode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-52439@lists.php.net to get a copy of this message | ||
urldecode does not decode "%0" bypassing it. I can cause troble when you are working with
fixed lenght strings.
You can you the function below.
function my_urldecode($string){
$array = split ("%",$string);
if (is_array($array)){
while (list ($k,$v) = each ($array)){
$ascii = base_convert ($v,16,10);
$ret .= chr ($ascii);
}
}
return ("$ret");
}
----
Manual Page -- http://www.php.net/manual/en/function.urldecode.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34280
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34280&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34280&report=yes