Php multi-File Upload array conversion,
<! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
<Html>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8">
<Body>
<Form action = "" method = "post" enctype = "multipart/form-data">
<Input name = "UpLoadFile []" type = "file" value = "1"/>
<Input name = "UpLoadFile []" type = "file" value = "2"/>
<Input name = "UpLoadFile []" type = "file" value = "3"/>
<Input name = "aa []" type = "hidden" value = "2"/>
<Input name = "aa []" type = "hidden" value = "3"/>
<Input type = "submit" name = "Button1" value = "Button" id = "Button1"/>
</Form>
</Body>
</Html>
<? Php
Print_r ($ _ FILES ['uploadfile']);
$ Arr = array ();
If (! Empty ($ _ FILES ['uploadfile']) {
Foreach ($ _ FILES ['uploadfile'] as $ k => $ v ){
Foreach ($ v as $ kk => $ vv ){
If ($ kk = $ kk ){
$ Arr [$ kk] [$ k] = $ vv;
};
}
}
Print_r ($ arr );
Exit ();
}
Print_r ($ _ POST );
Print_r ($ _ FILES );
?>