array_diff_key(): Difference between two arrays with respect to Keys
Returns all elements of $array1 which are not present in $array2 ($new_array=$array1 without $array2).... Here comparison is done based on the keys only ( NOT values ).
Comparison of two or more arrays are done by using values in array_diff() Example with two arrays
Output is here.
Keys of the first index are retained. ( no re-indexing done here)
Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
https://www.plus2net.com
|