what is nl2br?
Answers were Sorted based on User's Feedback
Answer / prantik gautam
nl2br() means newline to break. Actually when we retrieve
data from database using PHP mysql code, the nl2br()
function helps to get the format to maintain the sequence as
was at the time of insertion.
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / 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 |
Answer / madhu
nl2br is used for new for every entry
example :
<?php
mysql_connect("localhost","root","");
mysql_select_db("databasename");
$query=mysql_query("select * from table");
while($row=mysql_fetch_assoc($query)){
$var = $row['data'];
echo nl2br($var);
?>
| Is This Answer Correct ? | 1 Yes | 0 No |
How is the ternary conditional operator used in php?
How to take a substring from a given string in php?
Version of php, apache ,mysql
What is the capacity of mysql database?
How to define a user function?
What is php data type?
sort term descripttion form, report and uery
I have 10 elements of Array, how can i remove 5 array element, with single function.
How can we access the data sent through the url with the post method?
Explain briefly about a search-friendly site looks like?
How to link one site backend to another site frontend?
What does type casting mean in php? Explain with an example?