0
votes

I am trying to bind variables with symfony template like {{ 2ctc5qxi }} {{ !applianceType_page2_5 }}. but i am getting error

Unexpected token "name" of value "ctc5qxi" ("end of print statement" expected)

But it is working fine with keys, that does not starts with numbers & special characters.Please help in this.

2
variables can't start with number or special char, they should start with letter or underscore - ArtOsi

2 Answers

3
votes

PHP variables can't start with a number. So make sure that name of variables is as per convention defined here. PHP Variables Basics

2
votes

Just rename your variable 2ctc5qxi with something that starts with a letter or an underscore. Can't start with a number. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'.