You use the subtraction operator in a webpage for mathematical calculation. It helps in subtracting two values (numbers), which are also called operands, and together with the minus sign (-), they perform the subtraction.
Syntax:
$result = $left_operand - $right_operand;
Example:
<?php
$a = 20;
$b = 10;
$sub = $a - $b;
echo "The subtraction is: ". $sub;
?>
Output:
The subtraction is: 10
