bonjour, voici mon probleme:
mon html:
<input name="testArray[]" type="file">
mon php:
print_r($_FILES['testArray']);
le résultat obtenu:
1 2 3 4 5 6 7
| Array (
[name] => Array ( [0] => [1] => [2] => [3] => )
[type] => Array ( [0] => [1] => [2] => [3] => )
[tmp_name] => Array ( [0] => [1] => [2] => [3] => )
[error] => Array ( [0] => 4 [1] => 4 [2] => 4 [3] => 4 )
[size] => Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 )
) |
le résultat voulu:
1 2 3 4 5 6
| Array (
[0] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
[1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
[2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
[3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 )
) |
voila... y a til un moyen de recevoir le résultat voulu directement? ou il va falloir que je le transforme... c'est tres simple a transformer.. mais ca aurait été plaisant de recevoir directement le bon format.
Partager