Been looking at array_intersect but not sure how to pull the key location/element location of the elements found:
Say:
$a = array('a','b');
$b = array('c','x','b','a','y','z');
I would like to find where element "a" an "b" from array $a exist in array "$b"
I intend then to flag or store the largest element value found (ie. "b" from array $a) in some other variable.
In this case example, 'a' from array $a has a location of "3" in array $b, and 'b' from array $a has a location of '2' in array $b, thus value 'a' is larger than 'b'. I would then want to store the value of 'a' in some other variable.
Appreciate it.