当我向sqlite2 db插入带有换行符的文本时,所有的换行符都是 。
我可以用
$content = html_entity_decode($row['Content']);但是如何将它们转换为<br/>
我已经试过了
$content = str_replace(" ",'<br/>',$row['Content']);
$content = preg_replace("/\&\#10\;/", "<br/>", $row['Content']);
$content = str_replace("\x0a", "<br/>", $row['Content']);
$content = str_replace(' ','<br/>',$row['Content']);
$content = str_replace(" ","<br/>",$row['Content']);没有运气。 仍然存在,就像没有这些行一样。
下一步呢?
发布于 2013-05-31 06:21:18
试一试
$content = nl2br(html_entity_decode($row['Content']));https://stackoverflow.com/questions/16850787
复制相似问题