Introduction to the difference example in PHP \ r \ n \ t

Source: Internet
Author: User
Tags valid

  This article mainly introduces the difference of R RN T in PHP, the need of friends can refer to the following

N Soft Carriage return:  the first position in Windows that wraps and returns to the next line. Equivalent to the effect of R in Mac OS.   in Linux, Unix only means wrapping, but not to the beginning of the next line.     R soft space:  in Linux, UNIX to return to the beginning of the line.   represents a newline in Mac OS and returns to the beginning of the next line, equivalent to the effect of n in Windows.     T-jump (move to next column).     They are valid in a string of double quotes or delimiters, and are not valid in the string represented by single quotes.   RN is commonly used to denote the return key on the keyboard, or only N.   T represents the "tab" key on the keyboard.     Just as you use Enter and Shift+enter, if the effect you want to display on the page is also converted to HTML code or ...    the newline symbol:    Linux,unix: rn  windows:n  Mac os:r    corresponds to:    n LF or 0x0a (a)   R CR or ASCII in 0x0d (a)   t Horizontal tab-HT or ASCII 0x09 (9)   backslash   $ dollar break   "double quotes   ' single quotes    " about their origins and cause differences in scale original by:    "Enter" (Car Riage return) and "line feed" the two concepts of the origins and differences.   Before the computer appeared, there was a gadget called the Teletype Model 33, which could be 10 characters per second. But it has a problem, that is, after a line of line change, to use 0.2 seconds, just can hit two characters. If there are new characters coming in this 0.2 seconds, the character will be lost.     So the developers figured out a way to solve the problem by adding two characters to the end after each line. One is called "carriage return", which tells the typewriter to position the print head at the left edge, and the other is called "line-wrapping", telling the typewriter to move the paper down one line.     This is "line break" and "carriage return""From their English names can also be seen in one or two.     Later, computers were invented, and the two concepts were also on the computer. At the time, memory was expensive, and some scientists thought it would be a waste to add two characters to the end of each line. So, there was disagreement.     UNIX system, at the end of each line only "< line >", that is, "n" Windows system, each line at the end of the "< newline >< Enter >", that is, "NR"; Mac system, each line at the end of "< Enter > ". A direct consequence is that all text becomes a row when the files under the UNIX/MAC system are open in Windows, and Windows files open under Unix/mac, and a ^m symbol may be shown at the end of each line.     C language Programming (Windows system)     R is return to the line at the beginning this will cover the previous output of this row the     like:  code is as follows: int main () {   cout << "hahaha" << "R" << "Xixi"; }    last only show Xixi and hahaha back cover     n is a carriage return + newline the cursor is moved to the beginning of the line and then to the next line, which is the beginning of the next line     code as follows: int main () {    cout << "hahaha" << "n" < < "Xixi"; }    show:    hahaha  xixi 
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

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.