<br />标签的str_ireplace问题

我当前正在MySQL数据库中存储文本区域输入(HTML)。

使用php中的nl2br()函数保留textarea中的新行。

要发布存储的值,我使用了以下代码:

$post = getSinglePost($topic,$postId)[0];  //This is a function that retrieves a single post from my SQL database

$precontent = $post['postContent']; 

$anotherContent = str_ireplace("<br />","<br>",$precontent);

最后一行是我遇到的问题。由于某些原因,str_ireplace<br />以外的任何其他字符串值起作用。

有人可以指出代码有什么问题吗?

csfkk 回答:<br />标签的str_ireplace问题

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2557888.html

大家都在问