Account
Categories

Division Operator


You use the division operator (/) in a webpage for mathematical calculations.

It helps in dividing two values (numbers), which are also called operands, and together with the slash (/), they perform the division.

Syntax:

$result = $left_operand / $right_operand;

Example:

<?php
$a = 20;
$b = 5;
$div = $a / $b;
echo "The division is: ". $div;
?>

Output:

The division is: 4