-
Syntax:
- $var += expression
- var
- A variable.
- expression
- A value to add to the variable.
Addition assignment operator.
Adds the right operand to the left operand.
Examples
Code:
<?php
$a = 5;
$a += 5;
print $a;
?> Output:
10Explanation:
A variable is changed with an assignment operator.