RE: I need an array of state abbrev to names...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: tedd [mailto:tedd@xxxxxxxxxxxx] 
> Sent: Thursday, August 17, 2006 2:54 PM
> To: Daevid Vincent; php-general@xxxxxxxxxxxxx
> Subject: Re:  I need an array of state abbrev to names...
> 
> At 12:58 PM -0700 8/17/06, Daevid Vincent wrote:
> >B/c I'm too busy (and lazy) to hand type it all in, 
> wondering if someone has
> >an array of state abbreviations to names like so...
> >
> >$states = array(
> >...
> >	'NY' => 'New York',
> >	'WA' => 'Washington',
> >...
> >);
> 
> Daevid:
> 
> Everything you want should be found here.
> 
> http://xn--ovg.com/a_states
> 
> If you have any problems with it, please let me know.
> 
> Thanks for the exercise.
> 
> hth's
> 
> tedd

Excellent Thanks! I'd add this to it:

echo("<pre>");
foreach ($abrev as $abbreviation => $statename)
{
	echo "'".$abbreviation."' =>
'".ucwords(strtolower($statename))."',\n";
}
echo("</pre>");

Oh, and also that you have to be careful and use the 'save as' feature on
windows machines so as not to get funky "\r\n" instead of "\n" and then the
parser won't work. :)

DÆVID 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux