Possible Duplicate:
Find common values in multiple arrays with PHP
I have two arrays with the same indexes like ,
$a=Array
(
[2013-01-15] => Array
(
[0] =>1001
[1] => 1002
[2] => 1003
[3] => 1004
[4] => 1005
[5] => 1006
[6] => 1007
)
and
$b=Array
(
[2013-01-15] => Array
(
[0] =>1001
[1] =>
[2] => 1003
[3] =>
[4] =>
[5] => 1007
[6] =>
)
Now I would like to compare this data and to find out how many number of same elements are there. In this case there are three elements in common.