ok, it's late, my eyes are boggled - let me post this and get some zzzz's!
firstly, yes the for loop worked a treat for echoing on the "preview before submitting page".
Now though, I can't get it to submit -
I've tried to put the array into a variable so as to pass it through the subsequent submit button, but no dice :-(
here's what I have which is the page AFTER the multiple selection:
//check the array values
echo ("Array count is ".count($class_id)."<br>");
echo (" \$class_id is: ");
$class=(count($class_id));
for ($i = 0 ; $i < $class ; $i++){
echo $class_id[$i].", ";
$passed_class[]=$class_id[$i];
}
and this outputs:
Array count is 4
$class_id is: 1.6, 2.10, 2.13, 4.22,
so all well and good.
However, on this page, which is a preview page, I have to pass it through another 'submit' button (hence the variable (array?) $passed_class).
I pass it with an <input type=hidden name="passed_class" value="<?=$passed_class?>"
However, the next page has (a similar) script to check the variable:
echo ("Passed array count is ".count($passed_class)."<br>");
echo (" \$passed_class is: ");
$class=(count($passed_class));
for ($i = 0 ; $i < $class ; $i++){
echo $passed_class[$i].", ";
}
However, NOW the output is:
Passed array count is 1
$passed_class is: A,
WTF?!
It's late, maybe I'll see it tomorrow (as usual) but if someone can help would appreciate.
Cheers