+ -
当前位置:首页 → 问答吧 → 第三次求助这个问题,请帮帮忙

第三次求助这个问题,请帮帮忙

时间:2011-09-01

来源:互联网



前面发了两个求助没人回答,希望这次能有人帮帮忙!问题是有关addAll插入多条.

下面是表单代码
<td id="box_title" width="30%"><input style="width:90%; height:18px;" type="text"  class="input-text" name="type[]"  id="type" value=""/></td>
<td id="box_title" width="30%"><input style="width:90%; height:18px;" type="text"   class="input-text" name="money[]"  id="money" value=""/></td>
<td id="box_title" width="30%"><textarea style="width:90%; height:11px;"class="input-text" name="bask[]" cols="32"  id="bask" /></textarea></td>

里面有 type[]   money[]   bask[]  这三个字段,以数组形式提交.

接下来我在Action中把$_POST提交的数据 给了 $bo  dump($bo) 数组格式如下
array(3) {  
    [0] => array(2) {   
           [0] => string(9) "第一条"
           [1] => string(9) "第二条"  }  
   [1] => array(2) {   
           [0] => string(15) "第一条内容"   
           [1] => string(15) "第二条内容"  }  
   [2] => array(2) {   
           [0] => string(15) "第一条备注"   
           [1] => string(15) "第二条备注"  }
}

请问怎么写这个循环处理它才能一次插入啊,试了好多天了,求好心人指点一下吧!!!

作者: hygzs   发布时间: 2011-09-01

怎么这问题就没人回呢

作者: hygzs   发布时间: 2011-09-01