I have an array of array . Example like
a[0]={1,2,3};
a[1]={2,3,4};
**Edit** in a[2] from a[2]={4,5};
a[2]={2,4,5};
and more
How can I find common element which exist in all array ?
I have an array of array . Example like
How can I find common element which exist in all array ? |
||||
|
You can avoid foreach loop by
|
|||
|
This is a function I have made. It's just a reference for a multidimensional array.
It returns a result like this:
It returns true if the value of an array matches with a reference array. Hope the code can help you. |
|||||
|
Have a look here
|
|||||||||||||||||||||
|
As the name suggest, I think you can just use array-intersect From that page:
gives
|
|||
|