Basic PHP Programming Question:

Download Job Interview Questions and Answers PDF

What is meant by nl2br()?

PHP Interview Question
PHP Interview Question

Answer:

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

echo nl2br("god bless n you");

output:
god bless<br>
you

Download PHP Interview Questions And Answers PDF

Previous QuestionNext Question
What is the difference between PHP4 and PHP5?How can we encrypt and decrypt a data presented in a table using MySQL?