>>80
$line=explode(",",$file2[$i]);
if($file1[0] == $line[1])

これの $line[1]のつもりです。※正確には$line[0]