|Total Page :||829 Pages|
|PDF Size :||17.1 MB|
|PDF Link :||Available|
The array_intersect function extracts all members common to both arrays and returns a new array containing only those people. This array is then stored in $mutual.
Now it’s possible to use the array_diff function for each of the $followers and $following arrays to keep only those people who are not mutual friends, like this:
$followers = array_diff($followers, $mutual);
$following = array_diff($following, $mutual);