nl2br

nl2br

(PHP 4, PHP 5, PHP 7)

nl2brInserts HTML line breaks before all newlines in a string

Description

string nl2br ( string $string [, bool $is_xhtml = true ] )

Returns string with <br /> or <br> inserted before all newlines (\r\n, \n\r, \n and \r).

Parameters

string

The input string.

登录查看完整内容