What is meant by nl2br()?

Recommended Answers

All 3 Replies

break line

The nl2br() function adds the <br> tag if it finds the carriage return (\n) in the text. If you text is long and at many places carriage return is present, even then the nl2br() tag will replace all the occurrence of the carriage return with <br> tag.

Member Avatar for diafol

Look up the php.net manual. It's all there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.