How can PHP be used to perform arithmetic operations with variables?

To perform arithmetic operations with variables in PHP, you can simply use the arithmetic operators like addition (+), subtraction (-), multiplication (*), and division (/) along with the variables you want to operate on. Make sure to assign the result of the operation to a new variable if you want to store the result for later use.

$a = 10;
$b = 5;

// Addition
$sum = $a + $b;

// Subtraction
$diff = $a - $b;

// Multiplication
$product = $a * $b;

// Division
$quotient = $a / $b;

echo "Sum: $sum, Difference: $diff, Product: $product, Quotient: $quotient";