I'm trying to pass a multidimensional array, which I hear can't be done. So what I've done to get around it is this:
for ($i = 1; $i <= $size; $i++) {
for ($j = 1; $j <= $size; $j++) {
echo ('<input type="hidden" name="cell'.$i.$j.'b" value="'.$cell[$i][$j][block].'" />');
echo ('<input type="hidden" name="cell'.$i.$j.'s" value="'.$cell[$i][$j][status].'" />');
echo ('<input type="hidden" name="cell'.$i.$j.'a" value="'.$cell[$i][$j][answerval].'" />');
}
}
This is part of a form and I have used an echo to make sure that, for example, $cell[$i][$j][answerval] is correctly assigned a value. Yes, I have submitted the form to the target and now I'm trying to retrieve the values with this:
for ($i = 1; $i <= $size; $i++) {
for ($j = 1; $j <= $size; $j++) {
$cell["$i"]["$j"][block]=$POST["cell$i$jb"];
$cell["$i"]["$j"][status]=$POST["cell$i$js"];
$cell["$i"]["$j"][answerval]=$_POST["cell$i$ja"];
}
}
I must be making some inanely simple mistake in syntax because everything I retrieve is blank. How can I make this work?