I have a php loop that includes a count using $counter++, within the loop I want to add the code below but echo out the counter at the end of $Question & CheckboxGroup. How can I do this?
$Question = $_POST["CheckboxGroup"];
So each time it loops through it will create something like this:
$Question1 = $_POST["CheckboxGroup1"];
$Question2 = $_POST["CheckboxGroup2"];
$Question3 = $_POST["CheckboxGroup3"];
$Question4 = $_POST["CheckboxGroup4"];
$Question5 = $_POST["CheckboxGroup5"];
Don’t use variables with indices as part of the variable name. That’s what arrays are for.