Hello I've got a php array $arrayTitle that I have coverted into Twig:
echo $twig->render('newline.twig', array(
'allTheTitles' => $arrayTitle ));
and I want Twig to iterate the array:
{% for i in allTheTitles %}
<option>{{ i.allTheTitles }}</option>
{% endfor %}
unluckily this is the effect I get:
<select>
<option></option>
<option></option>
</select>
so it's as if Twig understood that it's an array and it guessed its lenght (2) but for some incomprehensible for me reason it doesn't return the values of the array. What do I do wrong here?
{{ i }}perhaps? sinceiis representing the current iteration value