这是阵列。
Array1
(
[439] => dsaffsdfdfdfsffdsf
[379] => 3454
[375] => 3 ///why is it removed in the resulting array?
[436] => Fdsafdfsdf
[432] => 3 /// this one too
[431] => 2
[385] => 499
[434] => 3501
[435] => 2013-01-16
[430] => 1
[440] => fsdzsdaffdsfffdsf
[406] => YES
[438] => 32442344324324234
[376] => 3
)
Array2
(
[376] => 3
[385] => 499
)
array_diff(array1, array2)
result
(
[439] => dsaffsdfdfdfsffdsf
[379] => 3454
[436] => Fdsafdfsdf
[431] => 2
[434] => 3501
[435] => 2013-01-16
[430] => 1
[440] => fsdzsdaffdsfffdsf
[406] => YES
[438] => 32442344324324234
)
对我来说很奇怪。任何的想法?它的删除基于价值?
我只想从Array2
Array1
个元素
答案 0 :(得分:0)
手册是您最好的朋友: