Posted by Janwillem Borleffs on 07/15/06 08:39
vito wrote:
> the 1st & 3rd are duplicates but the 4th one needs some attention.
>
> is there any convenient function to streamline this checking
> procedure? thanks in advance
>
Duplicates can be removed, e.g. with the following (when the text file isn't
too big!):
$file = file('test.txt');
$unique = array_unique($file);
$fp = fopen('test2.txt', 'w');
fputs($fp, implode('', $unique));
fclose($fp);
Where test2.txt now contains the unique records only. To detect the lines
that needs attention, you will need to define the criteria how to detect
them.
JW
[Back to original message]
|