pickledegg has asked for the wisdom of the Perl Monks concerning the following question:
Can someone shine the light of knowledge & wisdom upon my brow?@quantities = ('1','5','10','25','50','100'); foreach(@quantities){ print "<option value=\"$_\""; if ($userRecord{$pack_qty}==$_){ print " selected"; } print ">"; if (($userRecord{$pack_qty}==1)){# show name 'individual' for qt +y 1 else show number print "Individual</option>"; }else{ print "$_</option>"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Generating Select elements with foreach loops
by davorg (Chancellor) on Jul 11, 2006 at 09:41 UTC | |
by pickledegg (Novice) on Jul 11, 2006 at 10:36 UTC | |
by davorg (Chancellor) on Jul 11, 2006 at 10:41 UTC | |
by pickledegg (Novice) on Jul 11, 2006 at 10:50 UTC | |
|
Re: Generating Select elements with foreach loops
by hv (Prior) on Jul 11, 2006 at 11:21 UTC |