Compare to values of two arrays in PHP

前端 未结 6 1430
南方客
南方客 2021-01-20 14:56

Hi i want to compare all the values of 2 arrays and end up with a true or false . I am using the code below and would of thought that the result would be false . but that is

6条回答
  •  情深已故
    2021-01-20 15:13

        $before = array('1', '1', '0', '0', '1', '0' ) ;
        $after =  array('0', '1', '0', '0', '1', '0' ) ;
    
        $new_array= array_diff_assoc($before,$after);
    
        print_r ($new_array) ;
    

提交回复
热议问题