note 98542 deleted from function.http-build-query by danbrown

From: Date: Tue, 22 Jun 2010 03:38:02 +0000
Subject: note 98542 deleted from function.http-build-query by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170366@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- To vlad_mustafin at ukr dot net Line 6 of your function, I don't understand. <?php // ... if ($key) { $tmp_key = $key.'['.$tmp_key.']'; } // ... ?> $key is never defined, nor at the start middle, or end of the function. What is the purpose of this? The same line occurs in your second function also. Another note, I am attempting to simulate http_build_query so that I may manage duplicate keys that I have flagged with a prefix, to get an end result something like. somevar=1&somevar=2&somevar=3 In attempting this (checking the array keys for flags and replacing them when constructing the query string) I've found that urlencode() does not work the same at http_build_query() urlencode() is encoding my '&' (ampersand) as a %D9 or something, and various other characteristics as well. Why would this be the case?

« previous php.notes (#170366) next »