Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Array ( [0] => stdClass Object ( [stateId] => s1 [stateName] => Kuala Lumpur)
- [1] => stdClass Object ( [stateId] => s2 [stateName] => Selangor))
- <html>
- <head></head>
- <body>
- <form action="test3.php" method="post">
- State:
- <select name="state" id="state" onchange="showCity(this, 'city')">
- <option value ="">select one</option>
- <?php
- for($i = 0; $i < count($stateJsonObject); $i++)
- {
- echo '<option value = '.$stateJsonObject[$i] -> stateId.'>';
- echo $stateJsonObject[$i] -> stateName;
- echo '</option>';
- }
- ?>
- </select>
- <input type="submit" name="submit" value="Submit" />
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement