title: How to handle multiple file upload using PHP
body: <p>I want to upload files using PHP but the problem is that I don't know how many files I will upload. </p>
  
  <p>My question is how can I upload files if I use <code>file[]</code>? </p>
  
  <pre><code>&lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt;
  &lt;label for="file"&gt;Filename:&lt;/label&gt;&lt;input type="file" name="file[]" id="file" /&gt; 
  &lt;br /&gt;
  &lt;label for="file"&gt;Filename:&lt;/label&gt;&lt;input type="file" name="file[]" id="file" /&gt; 
  &lt;br /&gt;
  &lt;input type="submit" name="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I will add just File box and I will use JavaScript to create more file input to upload but how to handle them in PHP?</p>