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 are the 3 types of sessions?

570


What is the difference between require and include in php?

531


What is the main difference between require() and include()?

504


Can we override static method in php?

575


How to copy a file?

590






How can you submit a form without a submit button?

545


What should we do to be able to export data into an excel file?

543


What is default session time and path in php?

569


what is difference between PHP4 , PHP5

1930


Could we start a variable with number like $4name?

535


What are variables in research examples?

593


What is the meaning of a persistent cookie?

583


What is php routing?

538


Why do we use in php?

565


How can I prevent sql-injection in php?

616