3
如何通過樹枝模板中的字符串索引更改數組值?我想:如何在樹枝模板中設置數組值
{% do params['redirect_uri'] = 'http://site.loc/' %}
,但我得到NEX錯誤:
Unexpected token "operator" of value "=" ("end of statement block" expected) in
BWUserBundle:User/social:sign-in-thumbs.html.twig at line 4
我也想:
{% set params['redirect_uri'] = 'http://site.loc/' %}
,但有錯誤太:
Unexpected token "punctuation" of value "[" ("end of statement block" expected) in
BWUserBundle:User/social:sign-in-thumbs.html.twig at line 4
任何想法?
'意外標記的值 「標點」。 「」 (預計結束語句塊)BWUserBundle:User/social:sign-in-thumbs.html.twig at line 4' –
好的,現在檢查更新。 –
很酷,它的工作!謝謝! :) –