<?php
$file = file_get_contents('test.txt');
$arr = array_unique(explode(PHP_EOL, $file));
foreach($arr as $arrVal){
echo $arrVal.'<br>';
}
?>örnek txt:test1 test2 test7 test2 test2 test3 test3 test9-----
sonuç:
test1 test2 test7 test3 test9
10
●193
<?php
$file = file_get_contents('test.txt');
$arr = array_unique(explode(PHP_EOL, $file));
foreach($arr as $arrVal){
echo $arrVal.'<br>';
}
?>örnek txt:test1 test2 test7 test2 test2 test3 test3 test9-----
test1 test2 test7 test3 test9