[PHP] foreach $_FILES

2005-12-14 Thread Shaun
Hi, I have a form on my site with many file fields for users to upload files. I am trying to verify that for each file uploaded it corresponds with the name of the file field i.e. tr tdFile_1.CSV:/td tdinput type=file name=File_1.CSV/td /tr tr tdFile_2.CSV:/td tdinput type=file

Re: [PHP] foreach $_FILES

2005-12-14 Thread David Grant
Shaun, That is the documented behaviour for form fields in PHP. See Dots in incoming variable names on the following page: http://php.net/variables.external Cheers, David Grant Shaun wrote: Hi, I have a form on my site with many file fields for users to upload files. I am trying to

RE: [PHP] foreach $_FILES

2005-12-14 Thread Jay Blanchard
[snip] However if I loop through the $_FILES array like this: foreach( $_FILES as $key = $value ){ echo '$key = '.$key.'br /'; echo '$value = '.$value.'br /'; } $key = File_1_CSV $value['name'] = File_1.CSV $key = File_2_CSV $value['name'] = File_2.CSV The . is replaced with an underscore

Re: [PHP] foreach $_FILES

2005-12-14 Thread Jochem Maas
Shaun wrote: Hi, I have a form on my site with many file fields for users to upload files. I am trying to verify that for each file uploaded it corresponds with the name of the file field i.e. tr tdFile_1.CSV:/td tdinput type=file name=File_1.CSV/td /tr tr tdFile_2.CSV:/td