title: PHP Get method, escaping the "&" value
body: <p>i have this Download link that will be using a GET method, here's my code:</p>
  
  <pre><code>echo "&lt;a href='dlexcel.php?pname=".s1."&amp;year=".s2."'&gt;DOWNLOAD&lt;/a&gt;";
  </code></pre>
  
  <p>that will be recieve by dlexcel.php</p>
  
  <pre><code>$_GET['pname'].$_GET['year'];
  </code></pre>
  
  <p>the problem is, <code>s1</code> is string that can contain the a value <code>&amp;</code>. and the string itself is not complete when $_GET is called.</p>
  
  <p>i already used str_replace and preg_replace but i dont know how to. i need to pull the &amp; out and replace it with something else, i just dont know how or what.</p>