--TEST-- "cycle" function --TEMPLATE-- {% for i in 0..6 %} {{ cycle(array1, i) }}-{{ cycle(array2, i) }} {% endfor %} --DATA-- return array('array1' => array('odd', 'even'), 'array2' => array('apple', 'orange', 'citrus')) --EXPECT-- odd-apple even-orange odd-citrus even-apple odd-orange even-citrus odd-apple
info at phpclasses dot org