如何编译具有 html 元素的字符串以在 Web 上显示

Hoi*_*tar 0 html php compilation laravel

我有一个来自数据库的字符串,其中包含 html 标签。一切都是CKEditor过程的结果。

我尝试了几种方法,但没有奏效

`$data_from_db = <strong> this is title </strong>`
Run Code Online (Sandbox Code Playgroud)

我希望 这是标题以粗体打印在网络上。但出现的仍然是<strong> this is title </strong>

Vri*_*an7 5

如果你想呈现 HTML 使用

{!! $yourvar !!}

进入你的 .blade 文件