twig for loop in for loop code example
Example 1: how to for loop twig
{% for letter in 'a'..'z' %}
* {{ letter }}
{% endfor %}
Example 2: how to for loop twig
{% for i in 0..10 %}
* {{ i }}
{% endfor %}
{% for letter in 'a'..'z' %}
* {{ letter }}
{% endfor %}
{% for i in 0..10 %}
* {{ i }}
{% endfor %}