<?php
if(isset($_POST[‘submit’])){
$users = $_POST[‘user’];
$nums = $_POST[‘num’];
foreach($users as $key=>$val){
echo ‘user ‘,$key,’ = ‘,$val,’<br />’;
}
}
?>
<form method=“post”>
型号=<input type=“text” name=“user[]” value="" /> 数量=<input type=“text” name=“num[]” value="" /><br />
型号=<input type=“text” name=“user[]” value="" /> 数量=<input type=“text” name=“num[]” value="" /><br />
型号=<input type=“text” name=“user[]” value="" /> 数量=<input type=“text” name=“num[]” value="" /><br />
<input type=“submit” name=“submit” value=“提交” />
</form>