Differences between \ r \ n \ t in PHP

Source: Internet
Author: User

\ N soft carriage return:
In Windows, it indicates a line break and returns to the starting position of the next line. It is equivalent to \ r in Mac OS.
In Linux and UNIX, it only indicates line breaks, but does not return to the starting position of the next line.

\ R Soft Space:
In Linux and UNIX, return to the starting position of the row.
In Mac OS, line breaks are displayed and returned to the start position of the next line, which is equivalent to \ n in windows.

\ T hop (move to the next column ).

They are valid in double quotes or delimiters, and are invalid in single quotes.

\ R \ n is generally used together to represent the carriage return key on the keyboard. \ n can also be used only.

\ T indicates the "tab" key on the keyboard.

Just like the difference between using enter and SHIFT + enter, if you want to display the effect on the page, you need to convert it to HTMLCodeOr use...

Line feed characters in the file:

Linux, Unix: \ r \ n
Windows: \ n
Mac OS: \ r

Corresponding:

\ N lf or 0x0a (10) in ASCII)
\ R Cr or 0x0d (13) in ASCII)
\ T horizontal tab-0x09 (9) in HT or ASCII)
\ Backslash
\ $ Circle character
\ "Double quotation marks

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.