I have created two Arrays and i now want to get the matching element count based on these 2 Arrays.
Below is the Array Structures:
Array
(
[skill] => Array
(
[0] => 6
[1] => 10024
[2] => 2
[3] => 17
[4] => 16
)
)
Array
(
[skill] => Array
(
[0] => 6
[1] => 2
[2] => 17
)
)
Here three elements match and both array can have any numbers of skills/elements...... i need to find the matching element count based on these 2 Arrays.
I tried array_intersect() but it gave below result:
What i got:
Array
(
[skill] => Array
(
[0] => 6
[1] => 10024
[2] => 2
[3] => 17
[4] => 16
)
)
Basically i need to find the "count" of matching elements in both Arrays or return only matching elements from which i can get count.