On 23.02.2009, at 17:40, Majkel wrote:

I want to get a key of item and than use it it the loop as index of different
arrays.


When you loop "examplevariable" (as in tal:repeat="examplevariable examplearray"), then expression:

repeat/examplevariable/key

or

php:repeat.examplevariable.key

gives you current key in the loop.

You can use it as an index of an array with:

examplearray/${repeat/examplevariable/key}

or

php:examplearray[repeat.examplevariable.key]

--
regards, Kornel




_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to