Hello- I'm relatively new to php, so this may be common knowledge, but I'm having quite a time figuring this out.
I'm collecting a quantity ($indiv_qty) in an html form. Based on that quantity's value, I need to ask for that quantity's amount of information (name, address, email, etc.). To do this, I'm using a for loop:
for ($i = 1; $i <= $indiv_qty; $i++) {
echo "FORM_ELEMENT_$i"
}
so that if the user selects 3 on the first page, they'll have the opportunity to enter 3 sets of data (name1, add1, email1, name2, etc..)
The problem I'm having is echoing the values of these newly created variables on my final printable page. Since $i is indeed a variable, how can I echo "$name$i, $add$i, $email$i, $name$i, etc..." ?
Any help is greatly appreciated!
Thanks!
-Rob Maurizi