I am sending an array of files to php like this
<input type="file" name="image_name[]" />
But when I ask for 2 files for example and I foreach it, instead of 2 arrays with the file information it returns met 5 arrays of information with each array the file spec.
Foreach loop:
foreach($image as $key => $oneImage){
print_r($oneImage);
echo "<br />";
}
Output:
Array ( [0] => 3.jpg [1] => 5585_387497301371274_1740842451_n.png )
Array ( [0] => image/jpeg [1] => image/png )
Array ( [0] => /tmp/php8lgHOu [1] => /tmp/phpJOpJye )
Array ( [0] => 0 [1] => 0 )
Array ( [0] => 56405 [1] => 504664 )
If it isn't possible to get this as the array I would want it to be, how would I catch for example the tmp_name which is the third array? (Without having to make multiple foreach loops)
print_r($key)as well and you will be amazed ;)print_r($_FILES)return?