I'm new in PHP language , I have 2 csv files that contains:first 2 columns the first with some countries prefixes and the second with name of correspondent country. The second has 2 column the first has phone numbers and the second correspondent country. I need to make a compare of this 2 files if I found matching of prefixes, I need that this number to be deleted , and the rest of phone number to be added to another file. For example:
First File x.csv Second file y.csv prefix country country phone number 4474 UK UK 44793245683... 347466 Spain Spain 34746689211345 3278 Belgium Belgium 324568845212..... Switzerland 4189544562131... UK 4474321546588464... Italy 39324566546548345 UK 4478564684151...
So I want in another fil z.csv this output:
country phone number
UK 44793245683...
Belgium 324568845212.....
Switzerland 4189544562131...
Italy 39324566546548345
UK 4478564684151...
This means that in this numbers has found match of prefixes:
Country Phone NUmber Match Prefix
Spain 34746689211345 347466
UK 4474321546588464 4474