PHP Arithmetic Operators

Math Examples

Addition: 20 + 5 = 25

Subtraction: 20 - 5 = 15

Multiplication: 20 * 5 = 100

Division: 20 / 5 = 4

Modulus: 20 % 5 = 0

Explanation

The addition operator (+) adds two numbers together. The subtraction operator (-) subtracts one number from another. The multiplication operator (*) multiplies numbers. The division operator (/) divides one number by another. The modulus operator (%) gives the remainder after one number is divided by another.


Back to Activity 3 Home Page