what is nl2br?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does addslashes do in php?

529


Why is overriding runtime?

568


What is in a cookie?

545


How to block direct directory access in PHP?

549


What is echo and print in php?

493






How to insert an new array element in array?

532


Is python easier than php?

534


How to access standard error stream in PHP?

578


How to convert one date format into another in php?

481


Define soundex()?

507


Is it possible to protect special characters in a query string?

527


What is the difference between characters  and #?

532


What is htmlentities function in php?

503


What are the benefits of using php and mysql?

503


What function do we use to find length of string, and length of array?

525