If you do an array_diff between two values:
$ignore = array_diff($arr1, $arr2);
How can you make it avoid removing one specific value from $arr1?
Here are two arrays for example.
$arr = ['something', 'another thing', 'three things'];
$arr = ['something', 'another thing', 'different thing'];
And the value you want to keep:
$keep = 'something';
If you need that certain value to always be there, it probably would be easiest to just explicitly add it after doing the diff.
$ignore = array_diff($arr1, $arr2);
$ignore[] = $keep;
but if you only need it to not be removed if it is present, then you can use array_udiff.
$ignore = array_udiff($arr1, $arr2, function($a, $b) use ($keep) {
if ($a == $keep) return -1;
return $a == $b ? 0 : 1;
});