Hi, I want to compare all values from 2 arrays and end up with true or false. I am using the code below and thought the result would be false. but this is not the case when the last line is started, I expect something like
Array ([0] => 0)
but I do not see the display, so suppose php is happy that there is no difference
my code
$before = array('1', '1', '0', '0', '1', '0' ) ;
$after = array('0', '1', '0', '0', '1', '0' ) ;
$new_array= array_diff($before,$after);
print_r ($new_array) ;
sure array_diff should notice the difference here? any help would be greatly appreciated
source
share