Twig, c'est du sucre !
Also available in English
Twig a un sucre syntaxique que j’adore:
{% for i in [1, 2, 3, 4, 5][start:length] %}
# du code \o/
{% endfor %}
Il permet de découper un tableau de manière ultra-lisible.
Also available in English
Twig a un sucre syntaxique que j’adore:
{% for i in [1, 2, 3, 4, 5][start:length] %}
# du code \o/
{% endfor %}
Il permet de découper un tableau de manière ultra-lisible.