How to find the Minimum of Three Numbers in PHP - Step by Step Examples
How to find the Minimum of Three Numbers in PHP ?
Answer
To find the minimum of three numbers in PHP, you can use the `min` function.
✐ Examples
1 Find Minimum of Three Numbers
In this example,
- We assign values to variables
$a
,$b
, and$c
. - We use the `min` function to compare the numbers and get the minimum.
PHP Program
<?php
$a = 5;
$b = 8;
$c = 3;
$min = min($a, $b, $c);
echo "Minimum of three numbers is: $min";
?>
Output
Minimum of three numbers is: 3
Summary
In this tutorial, we learned How to find the Minimum of Three Numbers in PHP language with well detailed examples.