I use Twig and I have an array with keys like this:
array[1] = "alpha"
array[2] = "bravo"
array[3] = "charlie"
array[8] = "delta"
array[9] = "echo"
And I would like to get the key (1,2,3,8,9)
and the content (alpha, bravo, charlie, delta, echo)
in a loop to get all value of this array.
How do I solve this problem?
I found the answer :
{% for key,value in array_path %}
Key : {{ key }}
Value : {{ value }}
{% endfor %}