twig template foreach code example Example: twig foreach {% for key, value in array %} {{ key }}: {{ value }} {% endfor %}