Answer Posted / 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 |
Post New Answer View All Answers
What is difference between strstr() and stristr()?
Which is better python or php?
List some array functions in php?
Explain Type hinting in PHP?
Why is php used for web development?
/temp is a type of filesystem directory. State Whether True or False?
Tell me how can we get the error when there is a problem to upload a file?
Is php harder than javascript?
What is a collection in php?
What is a namespace in php?
What is __ construct in php?
Does php have block scope?
What is foreach loop in php?
What is the use of anonymous function in php?
What websites use php?