twig array keys and values

65

twig array keys and values -

<h1>Members</h1>
<ul>
    {% for key, user in users %}
        <li>{{ key }}: {{ user.username|e }}</li>
    {% endfor %}
</ul>

Comments

Submit
0 Comments