I am reading a text file and putting the contents which are file id's into an array.
I then have a new array with the same id's but one extra.
My aim is to compare these two arrays and print out the new file id or file id's
The problem I have is that When I use the function array_diff
, it prints everything and not the actual difference between the two arrays.
$results = array_diff($pNewList, $pSavedList);
$resultsCount = count($results);
for($x = 0; $x < $resultsCount; $x++){
echo $results[$x].'<br/>';
}
my output is printing every line even though the contents are the same in both arrays