php找出两个数组不同的值
for ($iall = 0; $iall < count($all); $iall++) { $isdel = 0; for ($tbs = 0; $tbs < count($ces); $tbs++) { if($all[$iall]['mobile'] == $ces[$tbs]['tel'] && $all[$iall]['bankid'] == $ces[$tbs]['bank']){ $isdel++; } } if($isdel == 0){ // var_dump($isdel); // var_dump($all[$iall]['order_id']); Db::table('order')->where('order_id',$all[$iall]['order_id'])->delete(); } }
$isdel 大于0的情况下 就是重复的值,等于0的时候就是不同的值了,