Not too shabby for a single line of PHP code, right? Let's move on to the following example, which finds out the minimum and maximum values of the numbers inside an array, and then displays them.
<!DOCTYPE html>
<html>
<body>
<?php
$numbers = array(7, 2, 5, 4, 14, 6, 17, 11, 29, 10);
$lowest = min($numbers);
$highest = max($numbers);
echo "Minimum value: " . $lowest . "<br>";
echo "Maximum value: " . $highest;
?>
</body>
</html>
We are using five lines of code here, but we are doing some useful stuff. We could use this snippet to find out the winner of an online contest, for example.
The image below shows the result and ends this tutorial. Do not worry, I will write at least one more using PHP.