如果你对该文章中的内容有疑问/不解,可以点击此处链接提问
要注明问题和此文章链接地址 点击此处跳转
foreach($_POST['et_name'] as $k1=>$vo1){ foreach($_POST['et_idcade'] as $k2=>$vo2){ if($k1==$k2){ $arr[$k1]['name'] = $vo1; $arr[$k1]['idcade'] = $vo2; } } } foreach($arr as $k=>$vo){ $et[$k]['type'] = 1; $et[$k]['hdid'] = $lxr['hdid']; $et[$k]['pid'] = $lxr['pid']; $et[$k]['name'] = $vo['name']; $et[$k]['idcade'] = $vo['idcade']; $et[$k] = $this->model->table('hdbminfo')->data($et[$k])->insert(); }