PHP Classes

File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test

Recommend this page to a friend!
  Classes of Duong Huynh Nghia   Lego PHP   Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test   Download  
File: Library/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.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: 573 bytes
 

Contents

Class file image Download
--TEST-- "batch" filter --TEMPLATE-- <table> {% for row in items|batch(3, '') %} <tr> {% for column in row %} <td>{{ column }}</td> {% endfor %} </tr> {% endfor %} </table> --DATA-- return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) --EXPECT-- <table> <tr> <td>a</td> <td>b</td> <td>c</td> </tr> <tr> <td>d</td> <td>e</td> <td>f</td> </tr> <tr> <td>g</td> <td>h</td> <td>i</td> </tr> <tr> <td>j</td> <td></td> <td></td> </tr> </table>