How to get the contents of the variable variables?
in conttoller: $name_1 = "title1"
in template: {% set var = name_ ~ id_point %}
Php analogue: $$var
Thanks.
You dont.
it's impossible?
You can use an array with a dynamic key, using dynamic names for a variable in Twig is a horrible idea.
Having something like var1, var2 is a good indication your are not using the right technique to solve a problem.
I dislike the "Impossible" word, you can of course, even if that's not recommanded.
{{ _context['name' ~ id_point] }}
Thank you, I understand that this is a bad way.
Unfortunately it is very difficult to alter.