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
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 the Code code as
This article mainly introduces the PHP function nl2br () and the Custom Function nl2p () line usage, combined with the example form to analyze PHP functions nl2br The advantages and disadvantages of implementing line wrapping function, and the use
Convert newline characters to .
Syntax: String nl2br (String string);
return value: String
Function type: Data processing
Content Description
This function converts the newline character to the instruction of the HTML wrapping.
Copy Code code
nl2br () Definition and usage
The NL2BR () function inserts an HTML newline character before each new line (\ n) in the string (
)。
GrammarNL2BR (String) parameter description
string is required. Specifies the string to check.
Example
Copy
Converts a line break to .Syntax: string nl2br (string );Return Value: StringFunction Type: Data ProcessingDescriptionThis function converts a newline character to an command for HTML newline.Copy codeThe Code is as follows:$ Str = 'first lineRow
NL2BR () Definition and usage
The NL2BR () function inserts an HTML newline character before each new line (\ n) in the string (
)。
Grammar
NL2BR (String) parameter description
string is required. Specifies the string to check.
Example
Copy the
This article illustrates the use of the PHP function nl2br () and the Custom Function nl2p () line-wrapping. Share to everyone for your reference, specific as follows:
Working with stories
Many occasions we simply use textarea to get the user's
Analysis on line feed usage of the PHP function nl2br () and the custom function nl22p (), nl2brnl22p
This article describes the use of nl-2br () and nl2p () for PHP functions. We will share this with you for your reference. The details are as
Converts a line break to .
Syntax: String nl2br (string );
Return Value: String
Function Type: Data Processing
Description
This function converts a newline character to an command for HTML newline.
CopyCodeThe Code is as follows: $ STR =
Definitions and usageThe NL2BR () function inserts an HTML newline character () before each new row (n) in the string.
GrammarNL2BR (String) parameter descriptionString required. Specify the string to check.ExampleEcho nl2br ("One line.nanother
/*commonly used string output function * * the echo () output String * print () outputs one or more strings * die () outputs a message and exits the current script * printf () output formatted string * sprintf () writes the formatted string to a
This article summarizes PHP's commonly used string manipulation functions. Share to everyone for your reference, as follows:
/* Common string output function * * the echo () output String * print () outputs one or more strings * die () outputs a
Php Tutorial: PHP nl2br () function instance tutorialDefinition and usageEach linefeed (n) inserted by the nl2br () function is in the same string.SyntaxNl2br (string)Parameter descriptionString required. Specified string checkTips and
The NL2BR () function converts a newline character in a string to an HTML line break symbol
Copy Code code as follows:
$str = "The last few days have been raining, sad dead
, the ball can't be played, and the shoes are soaking wet. ";
This article mainly introduces common string operation functions in PHP, and summarizes and analyzes common PHP skills for string operation in combination with examples, which has some reference value, you can refer to the examples in this article
The nl2br () function can convert a line break in a string into a line break in HTML.Copy codeThe Code is as follows:$ Str = "it has been raining for the past few days.The ball cannot be played, and the shoes are wet. ";Echo $ str;Echo " ";Echo
This article mainly introduces common string operation functions in PHP, and summarizes and analyzes common PHP skills for string operation in combination with examples, which has some reference value, you can refer to the examples in this article
The nl2br () function can convert a line break in a string into a line break in HTML.
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> PHP $ Str = " It has been raining for the past
The nl2br () function can convert a line break in a string into a line break in HTML.
CopyCodeThe Code is as follows: $ STR = "it has been raining for the past few days.
The ball cannot be played, and the shoes are wet. ";
Echo $ STR;
Echo " ";
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.