Answer the question
In order to leave comments, you need to log in
What is the correct way to loop in Twig?
There is an array
Array
(
[0] => Array
(
[7] => Июль
[8] => Август
[9] => Сентябрь
[10] => Октябрь
[11] => Ноябрь
[12] => Декабрь
)
[1] => Array
(
[7] => 19
[8] => 18
[9] => 11
[10] => 4
[11] => 3
[12] => 1
)
)
{% for key, value in leftMonth %}
<li>
<a href="?month={{key}}&year={{year}}">{{value}}</a>
<span class="leftbar-count">
<small>{{value2}}</small>
</span>
</li>
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question