Variables in PHP, PHP variables
Variables in PHP
The program is composed of two parts: the code and the data, the data is stored in the variable, the nature of the variable is a storage space in memory. Variables corresponding to the space has a name, called the variable name, the variable name is used to read and write data.
Definition of a variable
You must use the ' $ ' symbol before the PHP variable name, or you can understand that ' $ ' is the syntax structure of the defined variable
Example:
Access to variables
echo variable name;
Example:
Modification of variables
Variable name = value;
Deletion of variables
unset (variable name);
Example:
Naming conventions for variables:
1. Must start with ' $ '
2. Can only contain letters, numbers, underscores
3, ' $ ' symbol cannot begin with a number
http://www.bkjia.com/PHPjc/1116377.html www.bkjia.com true http://www.bkjia.com/PHPjc/1116377.html techarticle Variables in PHP , PHP variables PHP variable program is composed of code and data two parts, the data stored in the variable, the nature of the variable is a memory storage space. Variables corresponding to the empty ...