caxy/postal-code

Simple class to convert US postal codes to US states

1.0.1 2015-09-21 17:26 UTC

README

This is a simple class to convert from a US ZIP code to a US state. The data comes from Wikipedia.

Usage

<?php

// Returns 'NY'
$state = \Caxy\PostalCode::toState('10271');

// Returns 'IL'
$state = \Caxy\PostalCode::toState('60607');