二维数组操作问题。
array(10) {
[0] => string(7) "1986297"
[1] => string(7) "5738403"
[2] => string(7) "5108612"
[3] => string(7) "6907623"
[4] => string(7) "9452331"
[5] => string(7) "1041198"
[6] => string(7) "9157348"
[7] => string(7) "9475677"
[8] => string(7) "2701507"
[9] => string(7) "4474151"
}
array(6) {
[0] => string(7) "9589935"
[1] => string(7) "2134063"
[2] => string(7) "3444183"
[3] => string(7) "8259765"
[4] => string(7) "4235748"
[5] => string(7) "6303375"
}
array(4) {
[0] => string(7) "8466033"
[1] => string(7) "4097869"
[2] => string(7) "4279693"
[3] => string(7) "1170288"
}
array(13) {
[0] => string(7) "8018890"
[1] => string(7) "9299346"
[2] => string(7) "5109161"
[3] => string(7) "1621551"
[4] => string(7) "8571502"
[5] => string(7) "1511138"
[6] => string(7) "2391693"
[7] => string(7) "5106140"
[8] => string(7) "1296081"
[9] => string(7) "6388793"
[10] => string(7) "4217346"
[11] => string(7) "2059082"
[12] => string(7) "5127014"
}
array(12) {
[0] => string(7) "6288543"
[1] => string(7) "1425445"
[2] => string(7) "7275939"
[3] => string(7) "8211425"
[4] => string(7) "1599029"
[5] => string(7) "7525604"
[6] => string(7) "6219055"
[7] => string(7) "3442260"
[8] => string(7) "3837493"
[9] => string(7) "7877716"
[10] => string(7) "5960052"
[11] => string(7) "2364501"
}
array(7) {
[0] => string(7) "7596466"
[1] => string(7) "5632385"
[2] => string(7) "9329284"
[3] => string(7) "6540130"
[4] => string(7) "5874908"
[5] => string(7) "7956542"
[6] => string(7) "2430969"
}
array(9) {
[0] => string(7) "1683349"
[1] => string(7) "5708190"
[2] => string(7) "3798492"
[3] => string(7) "5836181"
[4] => string(7) "3847106"
[5] => string(7) "9871459"
[6] => string(7) "6522277"
[7] => string(7) "3986633"
[8] => string(7) "8706359"
}
array(6) {
[0] => string(7) "8745910"
[1] => string(7) "9148834"
[2] => string(7) "6535461"
[3] => string(7) "3902313"
[4] => string(7) "9383941"
[5] => string(7) "5640625"
}
取得上面的值,然后想让上面的ID 依次遍历,更改数据库中对应ID的字段值。。请问该怎么做?
取得的数组值为 $xulie;
foreach($xulie as $key=>$value){
if (is_array($val)) {
foreach($val as $key=>$val) {
// where这里应该如何填写更改字段值的代码?
M('ok')->where()->setInc("pay",1);
}
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论