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 |
What is final in php?
Why using the htaccess file
i got 2 year backs in my MCA,i am 28 year guy, presently learning PHP, can i get the job & on facing the interview wht i will answer out for that?? (experience in as a 1.5yr System analyst after graduation)
A process can run only in the background. State Whether True or False?
How many bootable file in O/S - XP,2000, and 98. which are the files.
What is session and Cokkies . How it works . tell some thing about Session_id()
How to find a length of a string in php?
Which method do you follow to get a record from a million records? (Searching not from database, from an array in php)?
Whether session will work if we disable cookies in client browser ?
How can I make a script that can be bilanguage (supports English, German)?
Explain how you can update memcached when you make changes to php?
How data or variable can be receive or send from PHP to HTML page??