I have two arrays like given below from these two arrays I am getting missing element that is also given below:
$news=[1,2,3,4,5,6,7];
$new=[1,2,4,6,7];
$missing=[3,5];
I want when I have two values or multi-values in that case if the condition should work and for another value else part to be executed
if(in_array($news,$missing))
{
echo "ok";
}
else
{
echo "no";
}
case would be :[3] ,[5] and [3,5];
I want if array value =3 output should be no if value=5 output should be=no if both then also output should be no but when value is different like [4] or [4,6] output would be ok;
can anyone please help me related this I am stuck here. Or is there any way to solve this kind of problems