Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php HTML表单数组提交模拟_Php_Html_Forms - Fatal编程技术网

Php HTML表单数组提交模拟

Php HTML表单数组提交模拟,php,html,forms,Php,Html,Forms,我试图模拟一个简单的HTML表单,它模拟来自外部方的HTTP POST。当我查看传入的POST数据时,它是这样的: array ( 'submission_id' => '1234567890', 'name' => array ( 0 => 'Bart', 1 => 'Simpson', ), 'address' => array ( 0 => '1000 Springfield Road', 1

我试图模拟一个简单的HTML表单,它模拟来自外部方的HTTP POST。当我查看传入的POST数据时,它是这样的:

array (
  'submission_id' => '1234567890',
  'name' => 
  array (
    0 => 'Bart',
    1 => 'Simpson',
  ),
  'address' => 
  array (
    0 => '1000 Springfield Road',
    1 => 'Level 2',
    2 => 'Los Angeles',
    3 => 'CA',
    4 => '90210',
    5 => '',
  ),
  'date' => 
  array (
    0 => '05',
    1 => '01',
    2 => '2017',
  ),
我试图用输入来模拟一个简单的HTML表单,但之前没有使用过数组,所以不确定语法。例如,“名称”是:


使用相同的name属性应在表单post中生成数组

<input type="text" name="name">
<input type="text" name="name">

我确实需要使用[]语法来获取编号的数组:

<input type="text" name="name[]">
<input type="text" name="name[]">

在我的测试中,我确实需要使用[]语法来获取编号的数组