Account
Categories

Addition Operator


You use the addition operator in a webpage for mathematical calculation. It helps in adding two values (numbers), which are also called operands, and together with the plus sign (+), they perform the addition.

Syntax:
$result = $left_operand + $right_operand;
Example:
<?php
$a = 10;
$b = 20;
$sum = $a + $b;
echo "The sum is: ". $sum;
?>
Output:
The sum is: 30