I parse file to remove identical lines. It took me quite a while so maybe somebody would need my little snippet 😉
$fr=fopen("./report.txt",'r');
$arr=file("./report.txt");
//Remove identical elements from the array
$n=count($arr);
for($i=1; $i<=$n; $i++){
for($j=$i; $j<=$n; $j++){
if($arr[$i-1]==$arr[$j]){$arr[$j]="";}
}
}
fclose($fr);