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

What is php ci?

546


What is the function in PHP do not return a timestamp?

563


What is helper library?

503


How to call php function from javascript using ajax?

512


Tell me how stop the execution of a php scrip?

521






What is the use of post in php?

500


Is php faster than javascript?

502


What is $$ in php?

524


What is difference between mysql_fetch_array and mysql_fetch_assoc?

493


How to redirect https to http url and vice versa in .htaccess?

512


Tell me is it possible to protect special characters in a query string?

489


List functions available to sort an php array?

539


What is cms php?

495


What is __ construct in php?

536


What does the unlink() function means?

538