Re: Min and max of array

From: Date: Fri, 07 Mar 2003 19:15:56 +0000
Subject: Re: Min and max of array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-138679@lists.php.net to get a copy of this message
----- Original Message ----- From: "Liam Gibbs" <liamgibbs@sympatico.ca> To: "php list" <php-general@lists.php.net> 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

« previous php.general (#138679) next »