Re: array_unique and some questions on Zend hash internals

From: Date: Sun, 04 Jun 2000 17:31:02 +0000
Subject: Re: array_unique and some questions on Zend hash internals
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-20194@lists.php.net to get a copy of this message
On Sun, 04 Jun 2000, Stanislav Malyshev wrote: > There could be a situation where it doesn't matter which key do you get, > as soon as you have one of them. For example, you have array of "news > headline" => "date" and you want to display one headline for each date. > Key-preserving unique function would serve you very good - as long as you > don't care which one you are displaying (and if you are displaying just > one, you don't care anyway). I don't buy that. From my experience, I can't think of any situations where I'd want to display a headline for each date, headline that I cannot control. This is similar to doing a group by on one column and selecting another column without any sort of aggregate operation on it - it's just not useful. -Andrei

« previous php.dev (#20194) next »