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\"
There's this example in the SensioLab page on the for tag:
for
Members {% for key, user in users %} {{ key }}: {{ user.username|e }} {% endfor %}
http://twig.sensiolabs.org/doc/tags/for.html#iterating-over-keys