note 100634 added to function.parse-url
| From: | mweber at osu1 dot php dot net | Date: | Wed, 27 Oct 2010 18:36:26 +0000 |
| Subject: | note 100634 added to function.parse-url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173514@lists.php.net to get a copy of this message | ||
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>
----
Server IP: 69.147.83.197
Probable Submitter: 64.161.157.131
----
Manual Page -- http://www.php.net/manual/en/function.parse-url.php
Edit -- https://master.php.net/note/edit/100634
Del: integrated -- https://master.php.net/note/delete/100634/integrated
Del: useless -- https://master.php.net/note/delete/100634/useless
Del: bad code -- https://master.php.net/note/delete/100634/bad+code
Del: spam -- https://master.php.net/note/delete/100634/spam
Del: non-english -- https://master.php.net/note/delete/100634/non-english
Del: in docs -- https://master.php.net/note/delete/100634/in+docs
Del: other reasons-- https://master.php.net/note/delete/100634
Reject -- https://master.php.net/note/reject/100634
Search -- https://master.php.net/manage/user-notes.php