Home  >  Article  >  Backend Development  >  A deep dive into the "<br />" and &q_PHP tutorials

A deep dive into the "<br />" and &q_PHP tutorials

WBOY
WBOYOriginal
2016-07-21 15:09:261416browse

rn is the line break of the output HTML code, and the effect seen by the customer does not have line breaks.

On the contrary
Effect:
I am the contentrnI am the content
I am the content
I am content
============================================== ======
r means: carriage return character (ACSII: 13 or 0x0d), which is what we often call a hard carriage return.
n means: line feed (ACSII: 10 or 0x0a), which is what we often call soft return.

The effect of these two cannot be seen on the page. Right-click the source file to see the code line break
====================== ============================
If it is output to the browser, use

If you are outputting to your own file, use "n", under windows it is "rn"
================ ===================================
n, just like you create a web page in DreamWeaver, in Press Enter in the source code to wrap the source code in a new line.
is an output (HTML markup language), which is interpreted in HTML as a newline for the input word. The function of n is to break the line in the source code. After inputting it, if you check the HTML source code, you will see that there is a line break. However, the HTML interpreter (browser) thinks it is useless and displays it the same whether it is used or not.
================================================== ===
n is the source code line break!

is the web page performance line break!!
==================== ==============================
Attachment: Detailed explanation of PHP nl2br() formatted output

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327306.htmlTechArticlern is the line break of the output HTML code, and the effect seen by the customer does not have line breaks. br /The opposite effect: I am the contentrnI am the content I am the contentbr /I am the content============================...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn