Reputation: 3770
I need to assign a variable which contains single quote.
In php I would do:
$hello='testing \' quotes ';
What is the twig equivalent code for printing quotes?
Upvotes: 1
Views: 8157
Reputation: 5245
It's the same since twig templates are converted to php anyway
{{ 'some string \' with a single quote in it' }}
{% set value = 'the quote is here ->\'<-' %} {{ value }}
Upvotes: 3