Hi, I'm working in a project where someone has to tell me how many files he wants to upload, then I generate the form with the number of files. I also generate the names of the variables to use in the target page inside my loop (to generate the form) like file_0, file_1, ... , file_n.
I'm using sessions and I have a lot of data that I collect in pages (one after the other) to, in the end of the process, load them into my DB. Then, not to deal with a miriad of variables (like file_0, file_n), I want to store the file_n variables in a array and here is my problem.
How do I store them in a array ? 'Cos I have to do something like:
for ($i=0; $i > $max_files; $i++) {
$files[$i] = $file_$i // this is wrong
}
So, the names of the files come as variables (from the form) and I want to store those variables in a array but the number of files are variable and I can't use something like $file_$i inside my code !
I appreciate any help 🙂
thx
Anderson