caxy/postal-code

Simple class to convert US postal codes to US states

1.0.1 2015-09-21 17:26 UTC

This package is auto-updated.

Last update: 2024-10-22 06:48:36 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');