Online Code Generator

PHP and Javascript Code Snippets for Common Uses

PHP USA State List HTML Select

You can use this script to generate a dynamic USA state html select list via PHP.

State Abbreviation:

<select name="state"><?php echo StateDropdown(null, 'abbrev'); ?></select>

State Abbreviation Pre-selected:

<select name="state"><?php echo StateDropdown('PA', 'abbrev'); ?></select>

State Full Name:

<select name="state"><?php echo StateDropdown(null, 'name'); ?></select>

State Full Name Pre-selected:

<select name="state"><?php echo StateDropdown('New Hampshire', 'name'); ?></select>

State Mixed:

<select name="state"><?php echo StateDropdown(null, 'mixed'); ?></select>

State Mixed Pre-selected:

<select name="state"><?php echo StateDropdown('CA', 'mixed'); ?></select>

mobil porno porno izle sex izle