728x90
SMALL
#php
#php / operator / assignment operator
The assignment operator in PHP is =. Save the right side of the equal sign to the left side of the equal sign.
$a = 10;
Assign 10 to variable a.
$a = 10;
$a = 20;
If you assign multiple times, the last assigned will be the value. So the value of variable a is 20.
$a = 10;
$a = $a + 10;
You can use existing values. The value of variable a is 20.
728x90
LIST
'PHP' 카테고리의 다른 글
[PHP] PHP/operators/increase operator, decrease operator (0) | 2022.08.13 |
---|---|
[PHP] PHP/operators/comparison operators (0) | 2022.08.08 |
[PHP] PHP/operators/arithmetic operators (0) | 2022.08.08 |
[PHP] How to create PHP/variables/flow variables (variables within variables) (0) | 2022.08.04 |
[PHP] PHP / Grammar (0) | 2022.08.02 |