What is meant by nl2br()?

Anwser :
nl2br() inserts a HTML tag <br> before all new line characters \n in a string.

echo nl2br(“welcome to \n PHP”);

output:
welcome to<br>
PHP