Find Lowest value min()

If the first and only parameter is an array, min() returns the lowest value in that array. If at least two parameters are provided, min() returns the smallest of these values.

<?php
echo min(2, 3, 1, 6, 7);  //  1
echo min(array(2, 4, 5)); //  2 
$val =  min(array(2, 4, 8), array(2, 5, 1)); // array(2, 4, 8 )
?>

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Reply

Your email address will not be published. Required fields are marked *

*