Parallel execution instead of foreach
<p>I currently do file upload sequentially with a <code>foreach</code> loop.Each upload is processed one after the other.</p>

<pre><code>&lt;?php
foreach ($files_array as $file) {
//each image is processed here and upload one after the other
}
?&gt; 
</code></pre>

<p>However processing multiple images instead of one at a time would be more efficient as the user will wait a lot less.How can i process multiple files at once in php instead of doing it sequentially with a foreach</p>