Q:

twig foreach

{% for user in users %}
    {{ loop.index }} - {{ user.username }}
{% endfor %}
0
{% for key, value in array %}
  {{ key }}: {{ value }}
{% endfor %}
0
    {% for user in users %}
        <li>{{ user.username|e }}</li>
    {% endfor %}
0
{% for i in 0..10 %}
    * {{ i }}
{% endfor %}
0

New to Communities?

Join the community