title: How to get multiple parameters with same name from a URL in PHP
body: <p>I have a PHP application that will on occasion have to handle URLs where more than one parameter in the URL will have the same name. Is there an easy way to retrieve all the values for a given key? PHP $_GET returns only the last value. </p>
  
  <p>To make this concrete, my application is an OpenURL resolver, and may get URL parameters like this:</p>
  
  <pre><code>ctx_ver=Z39.88-2004
  &amp;rft_id=info:oclcnum/1903126
  &amp;rft_id=http://www.biodiversitylibrary.org/bibliography/4323
  &amp;rft_val_fmt=info:ofi/fmt:kev:mtx:book
  &amp;rft.genre=book
  &amp;rft.btitle=At last: a Christmas in the West Indies. 
  &amp;rft.place=London,
  &amp;rft.pub=Macmillan and co.,
  &amp;rft.aufirst=Charles
  &amp;rft.aulast=Kingsley
  &amp;rft.au=Kingsley, Charles,
  &amp;rft.pages=1-352
  &amp;rft.tpages=352
  &amp;rft.date=1871
  </code></pre>
  
  <p>(Yes, I know it's ugly, welcome to my world). Note that the key "rft_id" appears twice:</p>
  
  <ol>
  <li><code>rft_id=info:oclcnum/1903126</code></li>
  <li><code>rft_id=http://www.biodiversitylibrary.org/bibliography/4323</code></li>
  </ol>
  
  <p><code>$_GET</code> will return just <code>http://www.biodiversitylibrary.org/bibliography/4323</code>, the earlier value (<code>info:oclcnum/1903126</code>) having been overwritten.</p>
  
  <p>I'd like to get access to both values. Is this possible in PHP? If not, any thoughts on how to handle this problem?</p>