tags:

views:

33

answers:

1

Sorry for my bad English.

I must to check 2 csv files, if strings with one id is different, must write to file. If there is no string with id from 1st file in second file, must write this to file too.

it works, but with element (id=47) i have got a trouble. it into to files, but script sad, that there is only in one.

download script you can from here http://sil-design.ru/uploads/script.zip

A: 

If you do a echo $str1[0].' - '.$str2[0].'<br />'; you will see that the two 47's are never compared. Also I am not sure what the t is in: $f2 = fopen($fileurl, 'rt');.

If you open your backup.csv in notepad and place your cursor after the 47;XL and hold delete to delete anything after it and save. Then try your script again, it should work. It seems that the backup.csv was created in a weird way, I am guessing PHP is getting an EOF before the file has even ended!

Abs