update page now
Laravel Live Japan

Voting

The Note You're Voting On

terry(-at-)shuttleworths(-dot-)net
19 years ago
I couldn't get array_intersect to work with two arrays of identical objects, so I just did this:

foreach ($firstarray as $key=>$value){
    if (!in_array($value,$secondarray)){
        unset($firstarray[$key]);
    }
}

This leaves $firstarray as the intersection.

Seems to work fine & reasonably quickly.

<< Back to user notes page

To Top