A user has the option to check off any combination of 6 check boxes on the form. After he hits submit, the following code should execute.

PHP Code:
    while (list ($key,$val) = @each ($box)) {
$array[i] = $val ;
$array[i] ;
$i $i;
$a $i ;    

//output array contents
for ($i 1$i <= $a$i++) {

$array[i] ;

"While ()" function is working; it outputs variables. but array (last portion of the code) is only outputting last variable checked. How can I go by storing user entered variables into array?

Thank you.