I have this code that gives back 3 arrays and I want to check for duplicates in all 3 and then keep only 1 value. But because the array is generated in a loop array_unique / array_ diff wont work.
is there any solution for this problem?
foreach ($ci AS $i) {
if($i == 0){
continue;
}
$cfsi = $cate->getCategoriesFeatureID($i);
echo "<pre>";
print_r($cfsi);
echo "</pre>";
}
The result I get
Array
(
[0] => 14
[1] => 15
[2] => 16
[3] => 18
[4] => 19
[5] => 20
[6] => 27
)
Array
(
[0] => 14
[1] => 15
[2] => 16
[3] => 17
[4] => 18
[5] => 19
[6] => 20
[7] => 21
[8] => 27
[9] => 28
)
Array
(
[0] => 11
[1] => 14
[2] => 16
[3] => 18
[4] => 19
[5] => 27
[6] => 28
)
The result I'm looking for
Array
(
[0] => 14
[1] => 15
[2] => 16
[3] => 18
[4] => 19
[5] => 20
[6] => 27
)
Array
(
[0] => 17
[1] => 21
[2] => 28
)
Array
(
[0] => 11
)