How does ‘Arithmetic Operators’ work in PHP?
Arithmetic Operators in PHP are virtually identical to those in Perl, as illustrated by the example code below:
// Addition
$ADD = $VAR + 3;
// Subtraction
$SUB = 18 - 6;
// Multiplication
$MULT = $VAR1 * $VAR2;
// Division
$DIV = 15 / $VAR;
// Modulus (Division to get remainder)
$MOD = $VAR % 2;
?>