It works exactly as things work in PHP. In PHP, variables defined before
constructs like foreach() and while() are available inside those constructs.
PHPTAL's *repeat* block is similar to those PHP constructs. There's no block
scope in PHP.

What I'd like to have is a separate scope for a macro, i.g. if the loop in
your example came from a macro, it would be similar to a function in PHP and
should have its own scope. I haven't tested such a scenario, and maybe this
is how PHPTAL works already. (?)

PHPTAL mailing list

Reply via email to