Hi,
I have a series of dynamically generated variables defined in my Perl code
which I pass through to my template, and I want to print those values in my
template
Here's an example of what I'm trying to do:
In in the perl code:
for ($j = 1; $j<10; $j++)
{
$vars{'key_val_'.$j} = "Value $j";
}
Which will add
key_val_1 = Value 1
key_val_2 = Value 2
Ect, ect
and I need to print them out via the template, but I can't seem to find out
how to do so
[% count = 1 %]
[% WHILE total <= count %]
Current value = [% 'key_val_' count %]<br>
[% count = count + 1 %]
[% END %]
I want the output to be:
Current value is Value 1
Current value is Value 2
ect, ect, ect,
How do I get TT to evaluate [% 'key_val_' count %] and return the
appropriate values?
Thanks.
Brad.
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates