nl2br
(PHP 4, PHP 5)
nl2br — Inserts HTML line breaks before all newlines in a string
说明
string nl2br ( string $string )
Returns string with '<br />' inserted before all newlines.
本文详细介绍了PHP中的nl2br函数,该函数用于在字符串中的每个换行符前插入HTML换行标签(<br/>)。这对于将纯文本转换为可以在网页上正确显示的格式非常有用。
(PHP 4, PHP 5)
nl2br — Inserts HTML line breaks before all newlines in a string
string nl2br ( string $string )
Returns string with '<br />' inserted before all newlines.

被折叠的 条评论
为什么被折叠?