PHP Arithmetic Operators
Addition (+): 20 + 6 = 26
Subtraction (-): 20 - 6 = 14
Multiplication (*): 20 × 6 = 120
Division (/): 20 ÷ 6 = 3.33
Modulus (%): Remainder = 2
Exponentiation (**): 20 squared = 400
Explanation
Addition combines numbers, subtraction finds the difference, multiplication finds a product, and division separates one number into equal parts. The modulus operator returns the remainder after division. The exponentiation operator raises a number to a power.
Return to Index