Pergunta

I have two files.

First one has 482 lines. Second one has only 519 lines.

I would like to find extra lines by comparing two files using php.

Lets say my first file has lines like this

Mango
Orange
Cherry
Apple 
Blackberry

And lets say my second file looks like this

Apple 
Orange
Mango
Banana
Cherry
Blackberry

Please note: The lines are in random order. Now i would like to use a php script to remove the same lines and keep the extra lines. For example File 1 contains line Mango. File 2 also contains that line but in random order. So i want to remove that line.

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top