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. File_1.CSV: File_2.CSV: However if I loop through the $_FILES array like this:

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.''; echo '$value = '.$value.''; } $key = File_1_CSV $value['name'] = File_1.CSV $key = File_2_CSV $value['name'] = File_2.CSV The . is replaced with an underscore in the

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 t