nl2br ( string text ) : string
Add in a text BR tags for line breaks.
Special recommandation
It is recommanded to execute nl2br before standardizeText because it linearize multiple spaces.It is recommanded to do not execute "select" to extract text with line breaks to take into account because the parser linearize multiple spaces.
string result = nl2br("Hello\nWorld"); // returns "Hello
World"
string result = nl2br("Line1\nLine2\nLine3"); // returns "Line1
Line2
Line3"
Parameters
text
The text to convert line breaks to
tags
tags