The use of PHP delimiters is both a matter of note

Source: Internet
Author: User

Precautions for using delimiters <<<

Delimiter identification must be consistent
You can define the delimiter identifier arbitrarily, such as the echo HTML Div, use meaningful identifiers as much as possible, and follow some kind of naming conventions.
After the beginning of the logo can not be followed by any characters, spaces can not be wrapped, followed by the text to be output.
End identification (followed by a semicolon;) must not have any characters, that is, the end of the identity to write the head, and the exclusive line, and thereafter, in addition to the next minute, can not have any characters (space also can not)
Finally, it should be noted that the end of the identity row cannot be the last line of the script, there must be a blank line or other lines of code, otherwise error.

Examples are as follows:

 <? php 
//format one $a =<<<html <table><tr>123<td></td><td></td><td></td></tr ></table>html; echo $a //Format two echo <<<eot; echo ' 999999 ';//This line is the last additional statement to satisfy the note

The use of PHP delimiters is both a matter of note

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.