title: Can I access repeated post variables in PHP without '[]' in the name?
body: <p>Say there is a form:</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" method="post"&gt;
      &lt;input name='foo'&gt;
      &lt;input name='foo'&gt;
      &lt;input type=submit&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>posting to my php script. How (if at all) can I find out the two values submitted in these boxes. <code>$_POST['foo']</code> gives the second value, but I want both.</p>
  
  <p>I realize this can be done by using <code>&lt;input name='foo[]'&gt;</code> (which would make <code>$_POST['foo']</code> an array). Due to certain coding decisions adding the square brackets is undesirable (read: would require some restructuring), and it seems that there should be an easy way to do this.</p>
  
  <p>If the enctype was 'application/x-www-form-urlencoded' then parsing it would be easy, but "multipart/form-data" is more complex and could have a 30MB file in it!</p>
  
  <p>Not to mention PHP has already parsed the post data.</p>
  
  <p>Please can someone tell me that PHP kept that information that it parsed from $_POST and that I can access it without re-parsing.</p>
  
  <p>Thanks!</p>