note 91471 added to function.httpquerystring-construct
| From: | michal dot kocarek at brainbox dot cz | Date: | Thu, 11 Jun 2009 14:19:53 +0000 |
| Subject: | note 91471 added to function.httpquerystring-construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156775@lists.php.net to get a copy of this message | ||
Note about first argument when calling the constructor:
â if true, instance will have initially exactly same query string as PHP received when user
accessed the page
â if false, instance will be empty.
<?
// Imagine that user puts âtest.php?name=JamesBond&age=30â into browser, thenâ¦
$query = new HttpQueryString(); // query is âname=JamesBond&age=30â. (First argument
is true by default.)
$query = new HttpQueryString(false); // query is empty
$query = new HttpQueryString(true, 'age=31'); // query is
âname=JamesBond&age=31â, name was preserved, age was updated
$query = new HttpQueryString(false, 'age=31'); // query is âage=31â
?>
Second argument can be string and associative array, same as for HttpQueryString->set() method.
----
Server IP: 212.24.129.51
Probable Submitter: 193.179.134.86
----
Manual Page -- http://www.php.net/manual/en/function.httpquerystring-construct.php
Edit -- https://master.php.net/note/edit/91471
Del: integrated -- https://master.php.net/note/delete/91471/integrated
Del: useless -- https://master.php.net/note/delete/91471/useless
Del: bad code -- https://master.php.net/note/delete/91471/bad+code
Del: spam -- https://master.php.net/note/delete/91471/spam
Del: non-english -- https://master.php.net/note/delete/91471/non-english
Del: in docs -- https://master.php.net/note/delete/91471/in+docs
Del: other reasons-- https://master.php.net/note/delete/91471
Reject -- https://master.php.net/note/reject/91471
Search -- https://master.php.net/manage/user-notes.php