Important Bits

US States for Select element in PHP

September 21, 2012

Need a list like this?

array(
     'AL'=>"Alabama",
     'AK'=>"Alaska",
     'AZ'=>"Arizona",
     ..

Eddie has you covered. Check his US State related PHP snippets. I was able drop that array into Laravel’s Form::select function and have a state selector ready to render.


Adam Sullovey

Written by Adam Sullovey, powered by Gatsby.
Find me on codepen, github, or at Toronto meetups.