So i have these radio buttons in XHTML that I want to put into a PHP function to generate and I can't get it to work.
In XHTML it looks like this and is working;
<p><input type="radio" value="<? echo blabla; ?>" name="radioA" checked="checked" /></p>
<input type="hidden" value="<? echo $value; ?>" name="hiddenA[]" />
In PHP I need to set the "radioA" and "hiddenA" to variables respectively "radioB"/"hiddenB", "radioC"/"hiddenC" and so on for my code to work. This is what I have so far but it is not working. The first radio name is a string, but the second one is array. Thanks in advance.
function radio($Radio, $Array) {
echo '<p><input type="radio" value="$value>" name="$Radio" />', $value, '</p>';
echo '<input type="hidden" value="$value" name="$Array" />';
}
I guess what I'm trying to do is to return the name of the variable as a string. $_POST['hiddenA'] ===> hiddenA[]
") strings for variables in them to be expanded.