Marc Guay wrote:
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;
The other question might be where are you getting the information from ;)
I filter the data in the database before loading the array ...
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php