Re: Unique items in an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> If the contact_id is the primary key, you could also use that as array
> index, which would automatically filter duplicates.

Thanks for this, it's so obvious I didn't see it.  I was adding items
to the array with $array[] = $contact when I could have just as easily
used $array[$contact['id']] = $contact;

Cheerios,
Marc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux