我想遍历一个数组,以便每次提交表单时,数组中的字符都会递增,这样世界上的每个人都会收到一个从以前使用过表单的人开始递增的字符。怎么做?
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
var i = 0;
</script>
<form action="index.php" method="post">
Country:
<select name="country">
<option value="A">America</option>
<option value="B">Germany</option>
<option value="C">Greece</option>
<option value="D">Russia</option>
<option value="E">UK</option>
</select><br>
Postcode:
<input type="text" name="postcode">
<input type="submit">
</form><br>
Your number is:
<?php
$place = array("T", "U", "V", "W", "X", "Y", "Z");
$person = "number";
$i = 0;
echo $_POST["country"] . $_POST["postcode"] . $place[$i] . $person;
?>
</body>
</html>