what is nl2br?

Answer Posted / rameshmjs

nl2br — Inserts HTML line breaks before all newlines in a string


Example using nl2br()
<?php
echo nl2br("foo isn't\n bar");
?>

The above example will output:

foo isn't<br />
bar

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where session is stored?

538


What is the difference between fopen() and fclose()?

590


How to merge values of two arrays into a single array?

489


What are the differences between mysqli_connect and mysqli_pconnect?

539


Tell us how to set cookies in php?

540






What is mvc in php?

537


What is the purpose of the '.frm' file extension? What do thes file contain?

515


What is warning – “cannot modify header information – headers already sent”?

640


When should you use a stored procedure?

509


Tell me how to find the position of the first occurrence of a substring in a string?

499


How to set a page as a home page in a php based site?

522


How is a session id generated?

540


How to parse configuration file in php?

536


What is the use of final class in php?

512


What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?

575