twig how to loop through array 0 and array 1 code example
Example 1: twig loop variables
{% for user in users %}
{{ loop.index }} - {{ user.username }}
{% endfor %}
Example 2: how to for loop twig
{% for i in 0..10 %}
* {{ i }}
{% endfor %}