title: how can send array in html forms to php
body: <p>I want to send uploaded files address from html to php with array and then moved the uploaded files to images from tmp and checked their size</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form method="post" enctype="multipart/form-data" name="form1" id="form1" action="upload.php"&gt;
    &lt;p&gt;
  
      &lt;input type="file" name="Img[]" /&gt;
    &lt;/p&gt;
    &lt;p&gt;
  
      &lt;input type="file" name="Img[]" /&gt;
  &lt;/p&gt;
    &lt;p&gt;
  
      &lt;input type="file" name="Img[]" /&gt;
    &lt;/p&gt;
    &lt;p&gt;
      &lt;input type="submit" name="submit" id="submit" value="Submit"&gt;
    &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  $name=rand('0123456789',5).'jpg';
  $files=array($_POST['Img[]']);
  
  echo '&lt;pre&gt;';
  print_r($files);
  
  if($_FILES['$files[0]']['type'] == 'image/pjpeg'){
  
      move_uploaded_file($_FILES[$files[]]['tmp_name'],'image/'.$name);
      echo "success";
  }
  ?&gt;
  </code></pre>
  
  <p>I want to upload files with form</p>