I have two arrays and would like to find the first matching element and return the value without the key being preserved.
I tried array_intersect
but it preserves the key.
For example:
$a = ['three', 'two', 'one'];
$b = ['five', 'one'];
$output = array_intersect($a, $b);
The resultant array returns [2] => ['one']
I just want this to be returned [0] => ['one']
Any workaround ?