PHP MYSQL - Operators - 5.2

 

AssignmentSame as...Description
x = yx = yThe left operand gets set to the value of the expression on the right
x += yx = x + yAddition
x -= yx = x - ySubtraction
x *= yx = x * yMultiplication
x /= yx = x / yDivision
x %= yx = x % yModulus                    
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

Popular posts from this blog

COPA Bits for Computer Based Test (CBT) by Venugopal Vanjarapu

COPA

Operating System