rahji.com

Main menu:

Site search

Categories

My Other Sites

People

Places

PHP Countries, States and Provinces

I modified my phpstates code include to display countries and Canadian provinces as well. The country codes come from the UPS developer’s API. This is another one of those snippets that I use often, so maybe it will help you out.

Here it is →   phpregions.php

If this post is interesting to you, subscribe to this site.

Comments

Comment from Lawrence
Time: April 7, 2009, 11:12 am

Hey,

Thanks for the quick copy and paste. Just to let you know, for provinces, LB => Labrador is not a province. It’s just Newfoundland.

Thx

Comment from Scott M. Sanders
Time: May 26, 2011, 11:14 am

Thanks for this. I was using Open Country Codes, but this has all the regional data that we need.

Write a comment