I have a 2d array
$list['1'][] ='23';
$list['1'][] ='24';
$list['1'][] ='25';
$list['1'][] ='26';
And a 1d array
$items={"23","24","36"};
following is right syntax for 1d array.
$items=array("23","24","36");
I want to check whether the $List[‘1’] values are inside the $items are not, if the items are not then store them into a new array
I tried
$different['1'][] = array_diff($items,$list['1']);
but if there are no difference it creates an array with key but empty value
$different[‘1]
['1'] => Array
(
[0] =>
)
This should do the trick