Converts a newline character to
。
Syntax: String nl2br (String string);
return value: String
Function type: Data processing
Content Description
This function converts a newline character to an HTML line-wrapping
Instructions.
Copy CodeThe code is as follows:
$STR = ' first line
Second line
The third line ';
echo $str;//No replacement
Echo ("
-----------------
");
echo nl2br ($STR);//Display after replacement
?>
Output
First row, second row, third row.
-----------------
First line
Second line
Third line
Nl2br
Converts a newline character to
。
PHP nl2br () Syntax: String nl2br (String string);
return value: String
Function type: Data processing
PHP nl2br () content description
This function converts a newline character to an HTML line-wrapping
Instructions.
http://www.bkjia.com/PHPjc/320366.html www.bkjia.com true http://www.bkjia.com/PHPjc/320366.html techarticle turns the newline character into Br. Syntax: String nl2br (String string); Return value: String function type: Data processing content Description This function converts a newline character to a br for HTML wrapping ...