function StateCodes($deft) {
$clist = "AL,AK,AS,AZ,AR,CA,CO,CT,DC,DE,FL,GA,HI,IA,ID,IL,IN,"
. "KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,NY,"
. "OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY";
$tok = strtok($clist, ",");
while ($tok != false) {
if ($deft == $tok) {
echo "\n";
}
else {
echo "\n";
}
$tok = strtok(",");
}
}
Sunday, July 12, 2009
PHP: Generate List of U.S. State Abbreviations
For form select listbox populating...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment