----- Original Message -----
From: "Liam Gibbs" <[EMAIL PROTECTED]>
To: "php list" <[EMAIL PROTECTED]>
Sent: Friday, March 07, 2003 12:07 PM
Subject: [PHP] Min and max of array


Is there a way to find the minimum and maximum values of an array? min() and
max() don't take arrays.

-----------------------------------

Umm.. yes they do take arrays.   Arrays of numbers..
$numbers = array(10, 5, 2, 4, 33, 50, 91);
echo min($numbers); // prints 2
echo max($numbers); // prints 91

Is this not what do you want?

- Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to