title: Compare 2 columns of two differences file csv, or 2 databese tables
body: <p>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.<br>
  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: 
     <pre>
      First File x.csv         Second file y.csv</p>
  
  <pre><code>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...   
  &lt;/pre&gt;
  </code></pre>
  
  <p>So I want in another fil z.csv this output:
      <pre>
      country     phone number
      UK          44793245683...<br>
      Belgium     324568845212.....
      Switzerland 4189544562131...
      Italy       39324566546548345
      UK          4478564684151... 
      </pre>
  This means that in this numbers has found match of prefixes:
      
      Country     Phone NUmber      Match Prefix
      Spain       34746689211345    347466
      UK          4474321546588464  4474 </p>
  
  <p></pre></p>
  
  <p>Thank you!</p>