I need an x number of variables, say x=100 variables, so $var_1 to $var_100. Ideally I'd like a for loop, for ($i=1; $i<101; $i++), and have the variables be created, something like... $($i)=initial_value or $$i=initial_value.
How can this be done?
Or, perhaps there's another way to solve my problem. I have a list of ID's that I need to allow a user to select out of. So, I basically make checkboxes, and they check off the ID's they want. Then, when the information is posted, I made a loop to collect together the ID's that were indeed checked off. That's what I need this strange way of declaring variables, because I need to go through every checkbox, each of which has an individual ID that grows and therefore cannot be hardcoded. Any other way to do this, outside of checkboxes?