Forum Moderators: coopster

Message Too Old, No Replies

opposite of array diff

         

therealgtron

8:13 pm on Aug 12, 2008 (gmt 0)

10+ Year Member



how do i compare to arrays and display the matches... like the opposite of array_diff.

thanks in advance! :)

therealgtron

8:19 pm on Aug 12, 2008 (gmt 0)

10+ Year Member



nvm, i found array_intersect.

mooger35

8:31 pm on Aug 12, 2008 (gmt 0)

10+ Year Member



what do the arrays look like?

If it's simple values you could merge the arrays and then use array_count_values to find the matches.

nevermind... you found a better solution. I could definately use that function. Learn something new everyday. :-)