Indirect reference, connection string, and join value assignment operator of variables in php getting started variables. [1] Indirect reference of a variable :? Php $ AB; $ a123; echo $ B ;? The above output is 123. we can see that $ is added in the second line of code, and the indirect reference of the variable [1] is accessed through the specified name:
The output above is 123
We can see that there is another $ in the second line of code, and the variable is accessed through the specified name, the specified name is stored in $ a ('B, change the value of $ B to 123. Therefore, such $ B variables are created and assigned values.
By adding the $ tag before the variable, you can increase the number of references at will.
[2] connection string: concatenates a string into a new merged string by using a concatenation operator (.) in English.
To give us a better understanding of the connection string, we changed it based on the above example (PHP5: powerful 2014)
In this example, quotation marks, spaces, and numbers are added. Below we will use two methods to write, the specific difference I found:
[3] join value assignment operator: if only one value is connected to another value, you can use the join value assignment operator (. = ). The following two statements are equivalent:
Why :? Php $ a = 'B'; $ a = '000000'; echo $ B ;? The above output is 123. we can see that $ is added to the second line of code and accessed by the specified name...