title: Way to get and edit GET variables in order to make hyperlinks
body: <p>Let's say that I have URL like <code>somefile.php?sort=id&amp;way=desc</code>.</p>
  
  <p>I want to write a function (or use already made one) that would let me add next variables to URL and set which I want to delete.</p>
  
  <p>I thought about something like <code>function editGetVar("$add","$leave")</code> where <code>$add</code> would be array with new variables to add to URL and <code>$leave</code> would be array with variables that must stay in URL.</p>
  
  <p>Example:</p>
  
  <pre><code>somefile.php?sort=id&amp;way=desc&amp;buyer=retailer
  </code></pre>
  
  <p>and I want to delete "buyer" and add "action", then the <code>a href</code> would look like this:</p>
  
  <pre><code>&lt;a href="somefile.php?sort=id&amp;way=desc&amp;action=edit"&gt;
  </code></pre>
  
  <p>I would appreciate any ideas from you.  </p>