Nasıl anahtarları başka dizide olmayan bir diziden kaldırabilirim?

0 Cevap php

Ben şu iki diziler var:

EDIT

On suggestion from @Wrikken I've cleaned the first array and now have this:

First Array:

Array
(
    [0] => 3
    [1] => 4
    [2] => 9
    [3] => 11
)

Second Array:

Array
(
    [3] => stdClass Object ( [tid] => 3 )

    [12] => stdClass Object ( tid] => 12 )

    [9] => stdClass Object ( [tid] => 9 )
)

EDIT

The second array is being filtered on the first array. The second array has 3, 12, 9. The first array doesn't contain 12, so 12 should be removed from the second array.

Yani ile bitmelidir:

Array
(
    [3] => stdClass Object ( [tid] => 3 )

    [9] => stdClass Object ( [tid] => 9 )
)

0 Cevap