Unable to get difference associative array with combined data. Those value which is not found in array:4 should be combined with array:2 as like below with count 0:
2=>array:2[
"value" => Occupation
"count" => 0
]
What I have already tried
$datas=[];
foreach($data as $arrayIndex=>$element){
$match = false;
foreach($domains as $key=>$elementToMatch){
if($element['value'] != $elementToMatch ){
$match = true;
$counts = ['value'=>$elementToMatch,'count'=>0];
}
if($match == true) {
break;
}
}
if($match) {
array_push($datas,$counts);
}
}
