chriso has asked for the wisdom of the Perl Monks concerning the following question:
Here is a sample of my output:foreach $counter (0 .. $#questions) { if ($radio_checkbox[$counter] eq "c") { print "$questno[$counter]. $questions[$counter] <BR>"; @labels = split (/,/, $selections[$counter]); foreach $counter2 (0 .. $#labels) { print '<BR><INPUT TYPE="checkbox" NAME="checkbox" VALUE=$counter2>$labels[$counter2]'; } print br; }
The checkboxes themselves are coming out ok, even though this does not show them. However, neither the value for $labels or the value for $counter2 is being printed. How can I set up checkboxes with various values and labels based on an array? Thanks. BTW, I couldn't get the brackets to print around my array elements for this post.1. What are three items found in the kitchen? $labels[$counter2] $labels[$counter2] $labels[$counter2] $labels[$counter2] $labels[$counter2] $labels[$counter2]
Edit Masem - CODE tags and formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Checkbox values
by Jazz (Curate) on Nov 13, 2001 at 03:25 UTC | |
by George_Sherston (Vicar) on Nov 13, 2001 at 14:13 UTC | |
by chriso (Sexton) on Nov 14, 2001 at 00:40 UTC | |
by George_Sherston (Vicar) on Nov 14, 2001 at 14:12 UTC | |
by chriso (Sexton) on Nov 20, 2001 at 01:50 UTC | |
by CharlesClarkson (Curate) on Nov 14, 2001 at 19:12 UTC | |
|
Re: Checkbox values
by dondelelcaro (Monk) on Nov 13, 2001 at 03:39 UTC | |
|
Re: Checkbox values
by mandog (Curate) on Nov 13, 2001 at 03:41 UTC | |
|
Re: Checkbox values
by mkmcconn (Chaplain) on Nov 13, 2001 at 03:52 UTC |