array_intersect(): Intersection of two or more arrays
$array1 : Required , the input array which will be checked. $array2 : Required , the values to be matched with $array1. Here values are used for comparison ( Keys are not considered ). ( In array_intersect_assoc() Both values and keys are considered for comparison ) Example 1
Output is here.
Keys of the first index are retained. ( no re-indexing done here) .
Example 2
Output is here.
Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
|