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 we load all classes that placed in different directory in one php file , means how to do auto load classes.
What is the difference between unset and unlink?
can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????
Write a program using while loop?
What is difference between compile time and run time polymorphism?
Write down the code for saving an uploaded file in PHP.
How you can update memcached when you make changes to php?
What are soundex() and metaphone() functions in php?
How can I reverse sort an array keeping the correlation between the index and value?
2 Answers Rushmore Consultancy,
Is PHP an open source software?
How can we get second of the current time using date function?
How do you use end in python?