PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Lego PHP
Blog and shopping cart system
Author: By
Last change:
Date: 7 years ago
Size: 360 bytes
 

Contents

Class file image Download
--TEST-- "for" tags can be nested --TEMPLATE-- {% for key, item in items %} * {{ key }} ({{ loop.length }}): {% for value in item %} * {{ value }} ({{ loop.length }}) {% endfor %} {% endfor %} --DATA-- return array('items' => array('a' => array('a1', 'a2', 'a3'), 'b' => array('b1'))) --EXPECT-- * a (2): * a1 (3) * a2 (3) * a3 (3) * b (2): * b1 (1)