Array declaration: $uids = array();
Next these arrays may or may not be created:
$uids['locations'];
$uids['ages'];
$uids['genders'];
If at least 2 of them are created I want to calculate the intersect. If all 3 are created I want the intersect of all 3.
So, I may want to calculate the intersect of $uids['locations'] and $uids['ages'] or the intersect of $uids['ages'] and $uids['genders'], etc.
If put all 3 arrays in array_intersect then I get errors if one of them is not an array. I'm not sure how to handle this without an awful lot of if:else statements and think there is a better way.