0

改行を含むテキストをsqlite2 dbに挿入すると、すべての改行が
.

私はそれらを取り除くことができます

$content = html_entity_decode($row['Content']);

しかし、どうすればそれらをに変換でき<br/>ますか?

私はこれまでに試しました

$content = str_replace("&#10;",'<br/>',$row['Content']);

$content = preg_replace("/\&\#10\;/", "<br/>", $row['Content']);

$content = str_replace("\x0a", "<br/>", $row['Content']);

$content = str_replace('&#10;','<br/>',$row['Content']);

$content = str_replace("&#10;","<br/>",$row['Content']);

運がない。これらの&#10;行がない場合と同じように、 はまだそこにあります。

次は何?

4

1 に答える 1

2

試す

$content = nl2br(html_entity_decode($row['Content']));
于 2013-05-31T06:21:18.113 に答える