M wrote:
> [% FOREACH row IN results %]
>      <tr>
>       <td>[% row[0]</td>
>       <td>[% row[1]</td>
>       ....
>       <td>[% row[11]</td>
>      <tr>
> [% END %]
> 
> I've tried passing it through by doing 
> 
> my $vars = {
>     copyright => 'released under the GPL 2008',
>     result => @results
> };
> 
> But that doesn't seem to work, and I'm not convinced by my row[n]
> syntax either.

You are storing the number of rows in @results. In scalar context like that, 
the length of the array is used. You need to use "result => [EMAIL PROTECTED]" 
so you are storing a reference to the array.

Your row[n] syntax is indeed wrong for TT. Use row.n. Reading the TT docs 
online would help you there.

You should not pay much attention to the difference between references and 
regular lists once inside TT as it does a good job of hiding all that from you.

-- Josh

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to