PHP Basic Syntax
Directory
1.1PHP Language Tags
1.2 Instruction delimiter "semicolon"
1.3 Notes in the program
Content
1.1 of four PHP language tags (same page unified style)
Recommended use of this
<%%>
1.2 instruction delimiter ";"
There are two types of statements:
One is the function execution statement (Assignment/output, etc.)
Be sure to add a semicolon later
With?> The most recent statement can be without a semicolon, it is recommended to add semicolons
One is the structure definition statement (if/for/while/class/function, etc. with curly braces)
You must not add a semicolon behind.
1.3 Notes in the program
Single-line comment//
Script Comment #
Document Comments/*
*
*/
Multiline Comment/* */
Note: 1. Multiple lines of comments can no longer contain multiple lines of comments
2. Comments to be written on the top or right of the code
The role of annotations
1. Comment out the inappropriate code that was previously written
2. Write the Help document
3. Debug program
There are some programming specifications commonly used in PHP: http://www.cnblogs.com/mo-beifeng/archive/2011/10/11/2207187.html