Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <select>
- <?php
- $country="US"; ~~~~~replace this with country code generator~~~~~~~
- switch ($country) {
- case "US":
- $states = array("usstate1", "usstate2" );
- break;
- case "UK":
- $states = array("ukstate1", "ukstate2" );
- break;
- }
- foreach($states as $state)
- {
- $state = htmlspecialchars($state);
- echo '<option value="'. $state .'">'. $state .'</option>';
- }
- ?>
- </select>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement