Subject: PHP

Find Intersection of Two Arrays

Write a PHP function to find the intersection of two arrays without using array_intersect().

Example:
Input: [1, 2, 3], [2, 3, 4]
Output: [2, 3]

Select file or drag and drop

PNG, JPG, SVG

Preview