What is Assignment operators?
PHP Assignment operators are used to assign values to variables. The right side value is substituted for the left side value in the operand variable. Operators in this category are in charge of assigning variables. The most frequent assignment operator is =, which assigns the operand’s right side to the left variable.
- Assignment Same as… Description
x = y x = y
The left operand gets set to the value of the expression on the rightx += y x = x + y
Additionx -= y x = x - y
Subtractionx *= y x = x * y
Multiplicationx /= y x = x / y
Divisionx %= y x = x % y
Modulus
Example:-
Output:-
Latest posts by Ashwani Kumar (see all)
- Top 10 DevOps Trainers in the world - October 7, 2023
- What is Cookies and Why it is Used? - May 24, 2023
- TOP trends of transitions in TikTok - May 10, 2023