so this html code below
<input type="checkbox" name="interest[]" value="driving">driving
<input type="checkbox" name="interest[]" value="skiing">skiing
would asign interest as an array which can be printed below
echo 'your interests are as follows:<ul>';
foreach($_POST['interest'] as $val)
{
echo "<li>$val</li>";
}
echo '</ul>';
but the sizeof() $val is one and is always the last checked checkbox.
normally i would asign an array as
$var=array('1'=>'sway', 'pray', 'tray');
but clearly there is no assignment of the array $val but it is printed but after the initial printing it is lost unless i redo the $_POST['interest'] etc.
i can accept this but what kind of learning method is that? i blame my book for not explaining properly.
can anybody please give me more info on the process going on here?
i appreciate it