Re: Re: Extracting multi dimensional array value
| From: | Christoph Becker | Date: | Sun, 03 May 2015 11:10:01 +0000 |
| Subject: | Re: Re: Extracting multi dimensional array value | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324854@lists.php.net to get a copy of this message | ||
German Geek wrote:
> Sorting is always more expensive than going through the array once.
That's a good point!
> I would
> just iterate through once and keep track of the smallest or largest element
> by storing the smallest or largest element in a temporary variable. There
> should really be a php function for that.
Actually, there is: min(), which seems to be the simplest and most
efficient solution for Ron's task.
--
Christoph M. Becker