note 91469 added to function.httpquerystring-set
| From: | michal dot kocarek at brainbox dot cz | Date: | Thu, 11 Jun 2009 13:55:41 +0000 |
| Subject: | note 91469 added to function.httpquerystring-set | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156772@lists.php.net to get a copy of this message | ||
Function accepts string or associative array in the params argument.
<? $query = new HttpQueryString(false); // query is empty
$query->set(array('city' => 'Prague', 'age' => 34)); //
query is âcity=Prague&age=34â
$query->set('age=20&gender=male'); // query is
âcity=Prague&age=20&gender=maleâ ?>
Also please note that variable can be unset *only* by passing NULL value in an associative array.
<? $query->set('city='); // query is âcity=&age=20&gender=maleâ
$query->set(array('city' => null)); // and now âage=20&gender=maleâ
?>
----
Server IP: 212.24.129.51
Probable Submitter: 193.179.134.86
----
Manual Page -- http://www.php.net/manual/en/function.httpquerystring-set.php
Edit -- https://master.php.net/note/edit/91469
Del: integrated -- https://master.php.net/note/delete/91469/integrated
Del: useless -- https://master.php.net/note/delete/91469/useless
Del: bad code -- https://master.php.net/note/delete/91469/bad+code
Del: spam -- https://master.php.net/note/delete/91469/spam
Del: non-english -- https://master.php.net/note/delete/91469/non-english
Del: in docs -- https://master.php.net/note/delete/91469/in+docs
Del: other reasons-- https://master.php.net/note/delete/91469
Reject -- https://master.php.net/note/reject/91469
Search -- https://master.php.net/manage/user-notes.php