4 Einträge, 1 Seite |
1
2
3
4
5
<select name="select">
<TMPL_LOOP NAME=LOOP>
<option><TMPL_VAR NAME=SMILIE></option>
</TMPL_LOOP>
</select>
1
2
3
4
5
6
7
8
9
10
$i = 0;
while($i <= $directories) {
push
@loop_data,
{
SMILIE => $directories[$i++],
},
;
}
$subtemplate->param(LOOP => \@loop_data);
Quotemy @loop_data = (); # initialize an array to hold your loop
while (@words and @numbers) {
my %row_data; # get a fresh hash for the row data
# fill in this row
$row_data{WORD} = shift @words;
$row_data{NUMBER} = shift @numbers;
# the crucial step - push a reference to this row into the loop!
push(@loop_data, \%row_data);
}
# finally, assign the loop data to the loop param, again with a
# reference:
$template->param(THIS_LOOP => \@loop_data);
4 Einträge, 1 Seite |