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 are in image creating functions in php
What is the meaning of curl , which is used while connecting with pay pal? and how it works?
Explain what are the different errors in php?
Is the cookies are available on cross domain?
•How to upload files using PHP?
What is php stack?
How to compare two strings with comparison operators in php?
Will react hooks replace redux?
Can a php code encryted? Is it possible to execute the php file which is encrypted(without decrypting), if so pleaze tell me the way.
i have a string and that string contains the alphanumeric value and i want to hide or semihide the 10 digit telephone number from the string.
What is the current stable version of php?
What are the features and advantages of object-oriented programming in php?