它们已经在数组中:$name
是数组,是这样$email
$name = $_POST['name'];
$email = $_POST['account'];
foreach( $name as $key => $n ) {
print "The name is ".$n." and email is ".$email[$key].", thank you\n";
}
要处理更多输入,只需扩展模式:
$name = $_POST['name'];
$email = $_POST['account'];
$location = $_POST['location'];
foreach( $name as $key => $n ) {
print "The name is ".$n.", email is ".$email[$key].
", and location is ".$location[$key].". Thank you\n";
}