如何在树枝模板中显示包含HTML的字符串? [英] How to display string that contains HTML in twig template?
本文介绍了如何在树枝模板中显示包含HTML的字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在树枝模板中显示包含HTML标签的字符串?
How can I display a string that contains HTML tags in twig template?
我的PHP变量包含以下html和文本:
My PHP variable contains this html and text:
$word = '<b> a word </b>';
当我在树枝模板中执行此操作时:
When I do this in my twig template:
{{ word }}
我明白了:
<b> a word <b>
我想要这个:
<b> a word </b>
有可能容易得到这个吗?
Is it possible to get this easily?
推荐答案
使用原始关键字 查看全文