首頁 >php教程 >php手册 >TP5批量添加學習中

TP5批量添加學習中

WBOY
WBOY原創
2016-12-01 00:00:221453瀏覽

TP5批次新增學習中
$attr_count = input('post.attr_name/a');  //批次新增規格屬性<br>                     foreach($attr_count as $keys=>$v){//大量新增規格屬性<br> <br>                         $list[]=[<br>                             'attr_id'=>input('post.attr_id/a')[$keys],.                             'attr_name'=>input('post.attr_name/a')[$keys],.                             'attr_value'=>input('post.attr_value/a')[$keys],post=>input('post.attr_value/a')[$keys],3$                             'attr_cps'=>input('post.attr_cps/a')[$keys],post=>input('post.attr_cps/a')[$keys])                             'if_task'=>input('post.if_task/a')[$keys],🜢                             'role_id'=>input('post.role_id/a')[$keys],.                             'radios』=>input('post.radios/a')[$keys],<br>                         ];<br>                     }<br>                     $model->attr()->saveAll($list);<br> <br><br><br><br> <br>

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn