I have a cycle of pregenerated buttons generated by a loop.
I need to access a certain "set" of them based on the feedback from a radio button.
I am trying to use dynamic variables to create such logic.
I have a radio box called 'Char' that is an integer. This tells me which character to affect.
Below I am just trying to get the character's name from the posted variables.
if ($x==$POST['Char'])
{
$tmpVar = "POST['CharName" . $x . "']" ;
echo $tmpVar; // displays "_POST['CharName1" whch is good.
$test= ${$tmpVar};
echo $test; //This just fails and for some reason
//my error reporting will not help me out.
}
I found a little snippet that helped me in the right direction, but it is not quite there.
$user="bob";
$holder="user";
echo "${$holder}";
Any help would be fabulous.