$_POST variable - Looping through numbered arguments
Posted: Thu Dec 11, 2008 1:36 pm
I have a list of 20 radio buttons, named "1", "2", "3"... "20" that are being submitted via a php form and the POST method.
When I capture the variables, I want to be able to execute a while loop that will print out all the values selected by the radio buttons... only I don't want to explicitly define all of them. I want to run something like this:
while ($loop < $count)
{
print $_POST[$loop];
$loop++;
}
When I capture the variables, I want to be able to execute a while loop that will print out all the values selected by the radio buttons... only I don't want to explicitly define all of them. I want to run something like this:
while ($loop < $count)
{
print $_POST[$loop];
$loop++;
}