note 89692 added to reserved.variables.get
| From: | slavik0329 at osu1 dot php dot net | Date: | Thu, 19 Mar 2009 15:01:05 +0000 |
| Subject: | note 89692 added to reserved.variables.get | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152144@lists.php.net to get a copy of this message | ||
the addget function below actually has more use when you dont use the recursive merge as such:
<?
function AddGet($ArrayOrString){
if(is_array($ArrayOrString))
return http_build_query(array_merge($GLOBALS['_GET'], $ArrayOrString));
parse_str($ArrayOrString, $output);
return http_build_query(array_merge($GLOBALS['_GET'], $output));
}
?>
In this case, if the key is added again with a different value it will be replaced with the new
value.
addget("change=true"); // ?change=true
addget("change=false"); // ?change=false
----
Server IP: 64.71.164.2
Probable Submitter: 208.167.225.40
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.get.php
Edit -- https://master.php.net/note/edit/89692
Del: integrated -- https://master.php.net/note/delete/89692/integrated
Del: useless -- https://master.php.net/note/delete/89692/useless
Del: bad code -- https://master.php.net/note/delete/89692/bad+code
Del: spam -- https://master.php.net/note/delete/89692/spam
Del: non-english -- https://master.php.net/note/delete/89692/non-english
Del: in docs -- https://master.php.net/note/delete/89692/in+docs
Del: other reasons-- https://master.php.net/note/delete/89692
Reject -- https://master.php.net/note/reject/89692
Search -- https://master.php.net/manage/user-notes.php