The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 2 of 2

Thread: Finding matches in two arrays

  1. #1

    Finding matches in two arrays

    I have two arrays. I need to find the ones that match and the ones that don't match.

    Array 1 has about 2000 records
    Array 2 has about 7000 records

    How could I find the keys of the arrays from Array 1 that match Array 2 and the ones that don't match?

    I tried a combination of things, but they don't seem to be very accurate and I run into different problems. I was doing something like this

    PHP Code:
    $array2 as $key => $value)
    // it's a match!
    // not a match

    Thanks in advance
    "You are playing a very dangerous game"
    "Change always is"

    Creativo Development

  2. #2
    Check out the array_diff and array_intersect function families.
    Wait, what?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012