title: How to identify a country from a normalized phone number?
body: <p>I have a list of international phone numbers and a <a href="http://en.wikipedia.org/wiki/List_of_country_calling_codes" rel="nofollow noreferrer">List of Country calling codes</a>.<br>
  I would like to identify the Country from the numbers but I can't find a fast and elegant way to do it.</p>
  
  <p>Any idea? The only I got is to have an hardcoded check (Eg. "look at the first number, look at the second number: if it's X then check for the third number. If the second number is Y then the Country is Foo", etc.).
  I'm using PHP and a DB (MySQL) for the lists, but I think that any pseudocode will help.</p>