One: PHP variables
-
Seven major variable types
Integer, Float, String, Array, object, NULL, resource.
-
Scope of the variable
Local, Global
Built-in Super global variables:
$GLOBALS 、所有全局变量的数组
$_SERVER、服务器环境变量数组
$_GET、通过GET方法传递给该脚本的变量数组
$_POST、通过POST方法传递给该脚本的变量数组
$_COOKIE、cookie变量数据
$_FILES、与文件上传相关的变量数组
$_ENV、环境变量数组
$REQUEST、所有与用户输入的变量数组
$SESSION、会话变量数组
-
Variable detection function
Is_xxx (), is a variable of type XXX
-
State detection of variables
Isset (): Whether the variable is set
Unset (): Destroying variables
Empty (): detects if a variable exists, and whether its value is null and not 0
-
Constant definition
define('常量名','常量值');
Two: operator
- Arithmetic operators
- String operator
- Assignment operator
- Comparison operators
- logical operators
- Bitwise operators
- Other operators
Ternary operator, error suppressor @, type operator instanceof
Three: Logical Structure
1. Select structure
If, If~else, switch~case
2. Cyclic structure
While, for, foreach
Summary picture
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the PHP learning-basic knowledge summary, including the content, I hope that the PHP tutorial interested in a friend helpful.