Functions:addressStateOptions

From Whirlwind eCommerce Wiki
Revision as of 14:15, 18 October 2008 by Root (Talk | contribs) (New page: == Description == Retrieves US states in a string of >option< tags. == Syntax == $stateOptionsString = eV::addressStateOptions($selection); == Paramaters == *$selection STRING (opt...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

Retrieves US states in a string of >option< tags.

Syntax

$stateOptionsString = eV::addressStateOptions($selection);

Paramaters

  • $selection STRING (optional)
2-character state that will be 'selected' from the options

Return Values

STRING of >option< tags.

Examples

Simple example
// retrieve option sting
$optionString = eV::addressStateOptions();
 
// output form
echo "<form action=\"index.php\" method=\"post\">";
 
// output optionString inside of state select
echo "<select name=\"state\">" . $optionString . "</select>";
 
// rest of form
echo "<input type=\"submit\" value=\"Post\">";
echo "</form>";