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
Tell me what are sql injections, how do you prevent them and what are the best practices?
How to concatenate two strings together in php?
Does php need a closing tag?
Tell me how can we determine whether a variable is set?
What is implode() in php?
How can we change the value of a constant?
Php says that an array is an ordered map. But how the values are ordered in an array?
Tell me what are the functions to be used to get the image's properties (size, width and height)?
What version of php do I have windows?
What does PEAR stands for?
Why do we use php?
what is mean by portal
Explain what are some new features introduced in php7?
What is the default session out time?
What is encapsulation in php?