When applying FOREACH to an array of arrays, nothing gets
executed.  (Template version 2.10) What am I missing?

-----BEGIN TEMPLATE-----
<table>
[% arr = [ [ 'a', 'b', 'c'], ['d', 'e', 'f' ] ] %]

[% arr %]
[% arr.0 %]
[% arr.0.0 %]
[% arr.1.1 %]
[% arr.size %]

[% FOREACH a IN arr %]
    <tr>
    [% FOREACH b IN a %]
        <td>[% b %]</td>
    [% END %]
    </tr>
[% END %]

</table>
------END TEMPLATE------

-----BEGIN OUTPUT-----
<table>


ARRAY(0x8114268) ARRAY(0x839da74) a e 2



</table>
------END OUTPUT------

The five output statements before the first FOREACH
confirm that the data structure is correctly built.
So why doesn't the outer FOREACH execute anything?

Jim Garrison
[EMAIL PROTECTED]


_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to