Advertisement
Guest User

Untitled

a guest
May 24th, 2013
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. <body>
  2. <select>
  3.         <?php
  4. $country="US"; ~~~~~replace this with country code generator~~~~~~~
  5. switch ($country) {
  6. case "US":
  7. $states = array("usstate1", "usstate2" );
  8.     break;
  9. case "UK":
  10. $states = array("ukstate1", "ukstate2" );
  11. break;
  12. }
  13. foreach($states as $state)
  14. {
  15.    $state = htmlspecialchars($state);
  16.    echo '<option value="'. $state .'">'. $state .'</option>';
  17. }
  18. ?>
  19.         </select>
  20. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement