(
"userServiceIds": "1,2,3",
"enggServiceIds": "4,5,6,2,1",
)
As In these array we need Only enggServiceIds only where It must not be repeated in userServiceIds
As my required result is : - 4,5,6 only
the code must be run in PHP
I have tried this code
$input = array("$data[userServiceIds]" , "$data[enggServiceIds]");
$result = implode(',',$input);
$str = implode(',',array_unique(explode(',', $result)));
but the result is :- 1,2,3,4,5,6
As my required result is : - 4,5,6 only
{}?array_unique()