nl2br

nl2br -- Converts newlines to HTML line breaks.

Description

string nl2br(string string);

Returns string with '<BR>' inserted before all newlines.

See also htmlspecialchars() and htmlentities().