SyntaxFix
Write A Post
Hire A Developer
Questions
Tags
How can I set member of an already existing array from Twig?
I tried doing it next way:
{% set arr['element'] = 'value' %}
but I got the following error:
Unexpected token "punctuation" of value "[" ("end of statement block" expected) in ...
This question is related to php twig
php
twig
Source: Stackoverflow.com