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 the use of header in php?
Explain the value of the variable input is a string 1,2,3,4,5,6,7. How would you get the sum of the integers contained inside input?
What does $_files means?
What are the Formatting and Printing Strings available in PHP?
How to check whether a number is prime or not?
What is the difference between core php and php?
What is $this in php?
Is php a float?
How to track user logged out or not? When user is idle?
What is include in php?
What is trait in php?
hey i m a trainee n jus wanted to ask that initially i was given the opportunity for .NET bt that project is abt to complete , nw i m asked to join a project of php on linux which is about to start , so wt say . is it a wise decision to join this project . will i be having job opportunities when i l complete my training after 4 months ? Plz suggest something ASAP .