Using array_diff()
, I can compare and remove similar items, but what if I have the following arrays?
Array1
Array
(
[0] => Array
(
[ITEM] => 1
)
[1] => Array
(
[ITEM] => 2
)
[2] => Array
(
[ITEM] => 3
)
)
Array2
Array
(
[0] => Array
(
[ITEM] => 2
)
[1] => Array
(
[ITEM] => 3
)
[2] => Array
(
[ITEM] => 1
)
[3] => Array
(
[ITEM] => 4
)
)
I want to filter out the similar items; result should return 4. How can I rearrange my array so that I can use array_diff()
?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…