Documentation says (https://docs.phalcon.io/en/latest/reference/volt.html#variables)
Variables¶
Variables may have attributes which can be accessed using the syntax: foo.bar. If you are passing arrays, you CAN access using the square bracket syntax: foo[‘bar’]
{{ post.title }}
{{ post['title'] }}
Does CAN mean MUST for Volt? Or should I set up something to make it working? (Twig handle everything in dot notation and I miss it here)
PHP - data
$menu = array(array('id' => 'test1'), array('id' => 'test2'));
$this->view->setVar('menu', $menu);
...
Volt
{% for index, item in menu %}
{{ index }} {{ item['id'] }} vs {{ item.id }}
{% endfor %}
{{ item.id }} ends up with Notice: Trying to get property of non-object