用PHP表单传递数组
test.php
formmethod="post" action="test2.php">
test2.php
print_r($_POST['a']);
?>
结果:
Array( [0] => 1 [1] => 2 [2]=> 3 )
test.php
formmethod="post" action="test2.php">
test2.php
print_r($_POST['a']);
?>
结果:
Array( [4] => 1 [5] => 2 [6]=> 3 )
test.php
formmethod="post" action="test2.php">
test2.php
print_r($_POST['a']);
?>
结果:
Array( [11] => 1 [22] => 2 [33]=> 3 )
一个动态生成的PHP表单数组,不依靠Javascript,就可以将很多数据仅仅以一个数组变量的方式提交上去