Reputation: 185
I execute a query and use that array for my twig template.
In my html:
{% for a in test%}
{{a.H}} {{a.2B}}<br>
{% endfor %}
The column title H works fine, but when I try to use 2B I get this error:
Fatal error: Uncaught Twig_Error_Syntax: Unexpected token "name" of value "B" ("end of print statement" expected)
Why can't I start with a number? Is there a way to fix this without having to rename my database column names?
Upvotes: 1
Views: 724