Reply to RE: [PHP] foreach $_FILES

Your name:

Reply:


Posted by Jay Blanchard on 10/11/46 11:34

[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 in the $key value. I could get around
this with a substr() but it seems a little inelegant, can anyone tell me why

this is happening please?
[/snip]

Periods are not allowed in variable names and are replaced by an underscore.
You could use regex to do the replacement so that you can do comparison.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация