title: Persistent HTTP GET variables in PHP
body: <p>Let's say I have some code like this </p>
  
  <pre><code>if(isset($_GET['foo']))
    //do something
  
  if(isset($_GET['bar']))
    //do something else
  </code></pre>
  
  <p>If a user is at example.com/?foo=abc and clicks on a link to set bar=xyz, I want to easily take them to example.com/?foo=abc&amp;bar=xyz, rather than example.com/?bar=xyz.  </p>
  
  <p>I can think of a few very messy ways to do this, but I'm sure there's something cleaner that I don't know about and haven't been able to track down via Google.</p>