note 91469 added to function.httpquerystring-set

From: 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

« previous php.notes (#156772) next »