➤ Assignment operators are used to write/uptade values to variables.
$x = 10;
$y = $x;
echo $y; // output: 10
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
For instance:
$x = 15;
$x %= 4; // output: 3
$x = 5;
$x *= 6; // output: 30
by Levani Makhareishvili
2 years ago
PHP
Operators
1
Pro tip: use ```triple backticks around text``` to write in code fences