title: Uploading multiple files and renaming - PHP
body: <p>I'm uploading multiple files.
  Main function works fine, but I have to change the names of uploading files Like:
  <code>name1.jpg</code>, <code>name2.jps</code>, <code>name3.jpg</code>, ...</p>
  
  <pre><code>$i = 1;
  if(move_uploaded_file($_FILES['upl']['tmp_name'], 'uploads/name'.$i++.'.'.$extension)){
       echo '{"status":"success"}';
       exit;
  }
  </code></pre>
  
  <p>Number <code>$i</code> should grow with amount of uploaded files.
  I hope that explained it correctly.</p>