note 100634 deleted from function.parse-url by danbrown

From: Date: Wed, 27 Oct 2010 20:15:10 +0000
Subject: note 100634 deleted from function.parse-url by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173522@lists.php.net to get a copy of this message
Note Submitter: mweber ---- simple code to flip one (current) query string parameter on or off: $gets4comments = $_GET; // copy of current query string array $gets4comments['showComments'] = $gets4comments['showComments']?"":"Y"; // flip parameter 'showComments' ?> <!-- output link to current page with parameter flipped --> <a href='?<?=http_build_query($gets4comments);?>'>link</a>

« previous php.notes (#173522) next »