Re: [PHP] Compare two TXT files

2004-07-17 Thread raditha dissanayake
C.F. Scheidecker Antunes wrote: Hello all, Is there a more efficient way to compare 2 TXT files other than reading line by line ? What I was doing was reading line by line and compare both files, if one line is different the loops are interrupted and the function returns true. Any ideas? how a

Re: [PHP] Compare two TXT files

2004-07-17 Thread Justin Patrin
That sounds pretty efficient to me if all you want is whether they're different. If you actually want to know how different, you could use something like levenshtein() to compare the contents of the files as strings. http://www.php.net/manual/en/function.levenshtein.php Or, for a more full solutio

[PHP] Compare two TXT files

2004-07-17 Thread C.F. Scheidecker Antunes
Hello all, Is there a more efficient way to compare 2 TXT files other than reading line by line ? What I was doing was reading line by line and compare both files, if one line is different the loops are interrupted and the function returns true. Any ideas? Thanks in advance. -- PHP General Mail