What is meant by nl2br()?

Answer Posted / ram

The nl2br() function inserts HTML line breaks (<br />) in
front of each newline (\n) in a string
Syntax: nl2br(string)
<?php
echo nl2br("One line.\nAnother line.");
?>
output: One line.
Another line.

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whether php supports microsoft sql server?

563


How can we display information of a variable and readable by human with php?

573


Do you know is it possible to extend the execution time of a php script?

584


How can we change the maximum size of the files to be uploaded?

516


What is the use of isset() in php?

539






What is the use of explode() function?

569


Which programming language does php resemble?

541


Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?

527


Is PHP an open source software?

582


What is php static function?

543


What is php trait?

527


What do the initials of php stand for?

578


What is the difference between static and dynamic websites?

510


What is http php?

500


Why do we use htaccess and where?

569