Am just getting into hashes etc. and getting confused. After doing my homework, I know I need to use $query->checkbox_group 'cos I need the value different from the 'on-screen' label (using an image).
I've checked out the docs and examples at CPAN, but they 'assume' an associative array has already been created for the following example;
What I'd like to know is how to create the data which \%labels contains? All I'll be doing is iterating through an array of variable names to build up a list of .... well, have a look for yourself:$query->checkbox_group(-name=>'group_name', -values=>['eenie','meenie','minie','moe'], -default=>['eenie','moe'], -linebreak=>'true', -labels=>\%labels );
foreach $key (0..$#languages){ $flag = ${'flag_' . $lang[$key][1]}; }
What can I do to get the necessary info into \%labels so I can use it for the $query->checkbox_group example?!?!?!?
Thanks in advance
Richard.
In reply to CGI & Creating an associative array dynamically by meetn2veg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |