php循环数组的数据怎么添加到MySQL数据库
foreach($dat["orderList"]as$k=>$v){//var_dump($v["priceInfo"]["sendFullName"]);}$nums...
foreach($dat["orderList"] as $k=>$v){
//var_dump($v["priceInfo"]["sendFullName"]);
}
$nums = count($dat["orderList"]);
priceInfo 是循环的
$data = array(
'SEND' => ($dat["send"]),
'RECEIVE' => ($dat["receive"]),
'TRANSPORTNAME' => ($v["priceInfo"]["productType"]),
'TYPE' => ($v["priceInfo"]["type"]),
'COMPANYCODE' => ($v["priceInfo"]["companyCode"]),
'SENDADDRESS' => ($v["priceInfo"]["sendAddress"]),
'RECEIVEADDRESS' => ($v["priceInfo"]["receiveAddress"]),
'instime' => time(),
); 展开
//var_dump($v["priceInfo"]["sendFullName"]);
}
$nums = count($dat["orderList"]);
priceInfo 是循环的
$data = array(
'SEND' => ($dat["send"]),
'RECEIVE' => ($dat["receive"]),
'TRANSPORTNAME' => ($v["priceInfo"]["productType"]),
'TYPE' => ($v["priceInfo"]["type"]),
'COMPANYCODE' => ($v["priceInfo"]["companyCode"]),
'SENDADDRESS' => ($v["priceInfo"]["sendAddress"]),
'RECEIVEADDRESS' => ($v["priceInfo"]["receiveAddress"]),
'instime' => time(),
); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询