Hello! There was a sorting task. There are 2 files with a set of lines (approximately 1000), each of which stores a number, for example 345234123 (9 characters - the largest number). It is necessary to compare two arrays and in the second to delete all the lines that are in the first array. How can I do that?
$array1 = file('Yalta.txt'); $array2 = file('Exclude.txt'); $result = array_diff($array1, $array2); foreach ($array1 as $array1) { echo $array1.'<br>'; } print_r($result);