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[]" />
When submitting 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 03 fields, however, if I select two fields yet count 03 appears.
My question is: How do I return the correct number of filled fields of the image type?