note 100900 deleted from function.urlencode by danbrown
| From: | danbrown@php.net | Date: | Sat, 13 Nov 2010 23:17:53 +0000 |
| Subject: | note 100900 deleted from function.urlencode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174010@lists.php.net to get a copy of this message | ||
Note Submitter: xdissent at gmail dot com
----
The example below from TK should have the call to urlencode within the create_function body, lest
the equal signs get encoded improperly:
<?php
$y = ("I" => "like", "she" => "likes");
array_walk($y , create_function('&$v, $k', '$v = $k . "=" .
urlencode($v);'));
echo "index.php?" . htmlentities(implode("&", $y), ENT_QUOTES);
?>