Multiple file upload issue
<p>I am new to PHP, and wondering how can i achieve the following result.</p>

<p>I have a HTML form to upload multiple files (PDF only), saying up to 5 files.
And for each files, it has a select tag for selecting different user (retrieve from DB), and another select tag for different months. Ideally, it is not complicated if user select file one by one, not skipping any file in middle.</p>

<pre><code>&lt;input type=file name=pdf[] /&gt;
&lt;select name=user[]&gt;
  &lt;option value=a&gt;user a&lt;/option&gt;
  &lt;option value=b&gt;user b&lt;/option&gt;
  &lt;option value=c&gt;user c&lt;/option&gt;
&lt;/select&gt;
&lt;select name=month[]&gt;
  &lt;option value=jan&gt; jan &lt;/option&gt;
               .
               .
               . so on
&lt;/select&gt;
</code></pre>

<p><strong>Example:</strong></p>

<pre><code>File1.pdf --- UserA --- Jan
File2.pdf --- UserB --- Feb
Not choose ---
File4.pdf --- UserA --- Mar
Not choose ---
</code></pre>

<p>When i click <code>submit</code>, the data contains several arrays here, one from <code>$_POST</code>, another one from <code>$_FILES</code>, so how can i recontruct and combine these arrays to a new array, and eliminate those empty.</p>

<p><strong>Like :</strong></p>

<pre><code>Array(
[0]=&gt; Array(user=&gt;userA, month=&gt;Jan, filename=&gt;File1.pdf, type=&gt;application/pdf, size=&gt;1234456)
[1]=&gt; Array(user=&gt;userB, month=&gt;Feb, filename=&gt;File2.pdf, type=&gt;application/pdf, size=&gt;1234456)
[2]=&gt; Array(user=&gt;userA, month=&gt;Mar, filename=&gt;File4.pdf, type=&gt;application/pdf, size=&gt;1234456)
)
</code></pre>

<p>Thanks in advance!</p>
