我已经将一个文本区域框与 ckeditor 集成在一起,每次我在后端按 Enter 换行时,它都会输出 <br>
在前端,有没有办法删除 <br>
在前端,因为我不希望 html 标签在前端输出
我的代码行如下所示
echo "<strong>Sites Linked Out To</strong>: " . $row->sites_linked_out_to;
有没有办法删除html <br>
在添加到数据库之前或之后添加标签?
提前谢谢
最佳答案
php strip Tags 函数写入标签次要参数,保持标签、其他 html 标签干净
strip_tags($input, '<a><img><div><strong>');
有关 strip 标签功能的更多信息 http://php.net/manual/tr/function.strip-tags.php
关于php - 删除 ckeditor 输出上的 <br> 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40264955/