foreach key=> value twig code example
Example: twig foreach key value
{% for key, user in users %}
<li>{{ key }}: {{ user.username }}</li>
{% endfor %}
{% for key, user in users %}
<li>{{ key }}: {{ user.username }}</li>
{% endfor %}