How to compare two arrays and remove matching elements from one for the next loop?

前端 未结 5 560
礼貌的吻别
礼貌的吻别 2020-12-09 17:36

How else might you compare two arrays ($A and $B )and reduce matching elements out of the first to prep for the next loop over the array $A?

$A = array(1,2,3         


        
5条回答
  •  自闭症患者
    2020-12-09 18:05

    See also array_unique. If you concatenate the two arrays, it will then yank all duplicates.

提交回复
热议问题