Re: Largest Member of Array

From: Date: Thu, 26 Jun 2003 22:31:28 +0000
Subject: Re: Largest Member of Array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-153036@lists.php.net to get a copy of this message
>How would i find the value of the largest number in this array? > >$example_data = array( >array("Mar-99",100,2000,5945.33,1234,10), >array("Feb-99",908,3454,4764.90,4321,50), >array("Jan-99",542,8000,13365.52,6012,60) >); end(array_reduce($example_data, create_function('$a, $b', 'return array(max(array_reduce($a, "max"), array_reduce($b, "max")));'))); --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html

« previous php.general (#153036) next »