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 is difference between static and final in php?

0 Answers  


What is the most convenient hashing method to be used to hash passwords?

0 Answers  


What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?

1 Answers  


Does not want to see PHPSESSID in the url. How can be done this ?

3 Answers  


Does php support multiple inheritance?

0 Answers  






hello friend koi mujhe bata skta ke php easy way se aur jaldi kese seekh skte h...plz im waiting for ur answer..

2 Answers  


What are hooks in php?

0 Answers  


How to calculate the difference between two dates using php?

0 Answers  


How many ways to include array elements in double-quoted strings using php?

0 Answers  


What is prepared statement in php?

0 Answers  


Why use php artisan serve?

0 Answers  


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

0 Answers  


Categories