What is meant by nl2br()?

Answers were Sorted based on User's Feedback



What is meant by nl2br()?..

Answer / gunjan

nl2br is used to convert \n to <br>

Is This Answer Correct ?    15 Yes 1 No

What is meant by nl2br()?..

Answer / sonal

Returns string with '<br />' inserted before all newlines.

Is This Answer Correct ?    11 Yes 1 No

What is meant by nl2br()?..

Answer / 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

What is meant by nl2br()?..

Answer / aashish gupta

nl2br is used to convert \n to <br>

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More PHP Interview Questions

What are the functions to be used to get the image's properties (size, width and height)?

0 Answers  


How stop the execution of a php scrip?

0 Answers  


Differences between get and post methods?

0 Answers  


Explain about Functions in PHP?

1 Answers  


How many types of php frameworks are there?

0 Answers  






Do you know what does $globals means?

0 Answers  


Which function would you use to determine the length of a string in php?

0 Answers  


How to get no of arguments passed to a PHP Function?

0 Answers  


Which function is used in php to count the total number of rows returned by any query?

0 Answers  


Difference between notify url, return url in paypal payment gateway?

4 Answers   A1 Technology, Capital IQ, CMS, Essar, HCL, IAS, Karvy, L&T, State Bank Of India SBI, TATA, Tisco, WNS,


what is Opern source?

3 Answers  


How to remove white spaces from the beginning and/or the end of a string in php?

0 Answers  


Categories