I have this this multilevel array :
$productpacks . Example $productpacks[0][0] is 4355 .
Now, I have another array that is simple : $codescart[] . Example $codescart[0] is 4355 .
I am trying to differ those two like this (it does not seem to work) :
foreach($productpacks as $pack) {
$diff = array_diff($pack, $codescart);
if (empty($diff)) {
// $cart contains this pack
}
}
Does that work for anybody ? or were is the problem if any ...