PHP Assignment Operators
PHP Assignment operators in PHP are used to create and initialize a variable. The most basic assignment operator is the (=) sign, which you can use to assign and update the value of variables.
The lefthand side of a variable is always variable, and the right hand can be literal, complex expression, simple variable or function. Assignment operators supported by PHP are Assign(=),Add then assign(+=),Subtract then assign(-=),Multiply then assign(*),divide then assign(/=).
|=||Assign||$m = $n||The value of $n is assigned to $n|
|+=||Add and Assign||$m += $n||It works similar to $m = $m + $n|
|-=||Subtract and Assign||$m -= $n||Subtraction similar to $m = $m - $n|
|*=||Multiply and Assign||$m *= $n||Multiplication similar to $m = $m * $n|
|/=||Divide and Assign
|$m /= $n||Find quotient similar to $m = $m / $n|
|%=||Divide and Assign
|$m %= $n||Find remainder similar to $m = $m % $n|
PHP - Assign Operator(=):-
PHP - Add and assign Operator(+=):-
PHP - Subtract and assign Operator(-=):-
PHP - Multiply and assign Operator(*=):-
PHP - Divide and assign Operator(/=):-