I want to find the intersection of elements between two arrays; the result will go to another array.
I've written: $result = array_intersect($arrayone,$arraytwo);
If I write count($result) it returns a correct value, but if I write $result[0] it returns the following notice: Notice: Undefined offset: 0.
var_dump($result);to inspect the variable.