note 98542 added to function.http-build-query

From: Date: Tue, 22 Jun 2010 02:41:17 +0000
Subject: note 98542 added to function.http-build-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-170365@lists.php.net to get a copy of this message
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? ---- Server IP: 69.147.83.197 Probable Submitter: 220.157.84.203 ---- Manual Page -- http://www.php.net/manual/en/function.http-build-query.php Edit -- https://master.php.net/note/edit/98542 Del: integrated -- https://master.php.net/note/delete/98542/integrated Del: useless -- https://master.php.net/note/delete/98542/useless Del: bad code -- https://master.php.net/note/delete/98542/bad+code Del: spam -- https://master.php.net/note/delete/98542/spam Del: non-english -- https://master.php.net/note/delete/98542/non-english Del: in docs -- https://master.php.net/note/delete/98542/in+docs Del: other reasons-- https://master.php.net/note/delete/98542 Reject -- https://master.php.net/note/reject/98542 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170365) next »