PHP MYSQL - Operators - 5.2
Assignment Same as... Description x = y x = y The left operand gets set to the value of the expression on the right x += y x = x + y Addition x -= y x = x - y Subtraction x *= y x = x * y Multiplication x /= y x = x / y Division x %= y x = x % y Modulus Ex: = <!DOCTYPE html> <html> <body> <?php $x = 100; echo $x; ?> </body> </html> Ex: += <!DOCTYPE html> <html> <body> <?php $x = 10; $y = 20; $x+=$y; echo $x; ?> </body> </html> Video