Looping and nested sections
| From: | Andrei Zmievski | Date: | Mon, 28 Feb 2000 16:19:40 +0000 |
| Subject: | Looping and nested sections | ||
| Groups: | php.template | ||
| Request: | Send a blank email to php-template+get-229@lists.php.net to get a copy of this message | ||
How should the following situation be handled:
...
tmpl_assign("foo", array(1, 2, 3));
...
...
{{section sec1}}
...
{{ $foo }}
...
{{section sec2}}
...
{{ $foo }}
...
{{/section}}
{{/section}}
Should only sec1 loop through the values of $foo and sec2 just uses the
current iteration's value, or should the looping be restarted for sec2?
It seems that the first solution would be more intuitive. Comments?
-Andrei
"Freedom comes when you learn to let go.
Creation comes when you learn to say no."
-madonna