Re: removing duplicate entries from array
| From: | Teodor Cimpoesu | Date: | Fri, 21 Jul 2000 09:53:29 +0000 |
| Subject: | Re: removing duplicate entries from array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7540@lists.php.net to get a copy of this message | ||
Hi Steven!
On Fri, 21 Jul 2000, Steven Glogger wrote:
> is there a quick way to remove all double entries from a array?
if you asked for a function nope,
you can do smth. ~
$a = array (1,1,2,2,3,3);
$b = array ();
foreach ($a as $k) {
!in_array ($k,$b) && $b[] = $k;
}
$a = $b;
-- teodor