Page 1 of 1

is there a way to do this

Posted: Thu Oct 20, 2005 12:07 am
by jaymoore_299
Given a set of radio buttons with names radio1 , radio2 , radio 3 , ....
I want to be able to do this:

Code: Select all

$number=1;
print "$_POST['radio".$number."']";
so that by changing the $number variable I can access any of the radio button
but this does not work, I tried escaping the characters, using variable variables, but this doesn't seem to work either.

Posted: Thu Oct 20, 2005 12:14 am
by feyd

Code: Select all

$_POST['radio'.$number]