0
In the following structure:
<input type="file" id="imagem_01" name="imagem[]" />
<input type="file" id="imagem_02" name="imagem[]" />
<input type="file" id="imagem_03" name="imagem[]" />
By sending I use this way:
echo count($_FILES['imagem']['tmp_name'])
;
Array
(
[name] => Array
(
[0] => 1491629_701232416581971_1576042449_n.jpg
[1] => 1798325_1420590811513009_1411268959_n.jpg
[2] =>
)
)
Returning me 03 fields, however, if I select two fields still appear count 03.
My question is: How do I return the correct number of fields filled image type?
The form sends the field, but empty. You would have to count the ones that are set
– Daniel Costa
count(array_filter($_FILES['imagem']['tmp_name']))
probably already emilinará all null values.– Woss
Perfect @Andersoncarloswoss, that’s exactly what I needed. :)
– Sr. André Baill