PHP: Sum of two number

PHP: Sum of two number

February 5, 2023

In PHP, you can add two numbers by using the addition operator +. For example:

$num1 = 10;
$num2 = 20;
$sum = $num1 + $num2;

echo $sum; // Outputs 30

 

Leave A Comment