<?php $a = [1,2,2,3,3,3,4,4,4,4]; $b = [2,3,5]; var_dump( array_intersect($a, $b), // [2,2,3,3,3] array_intersect($b, $a) // [2,3] );
You have javascript disabled. You will not be able to edit any code.