Find lowest value with the min() function in PHP

Description

The following code shows how to find lowest value with the min() function.

Example


  // w  w  w.  j  av  a2  s .  com
<?php
    echo(min(2,4,6,8,10) . "<br>");
    echo(min(22,14,18,28,35) . "<br>");
    echo(min(array(4,6,8,10)) . "<br>");
    echo(min(array(41,16,11,11)));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions