$uids = M('user_pid')->where("pid = 2")->field("uid")->select();
$count = count($uids);
foreach ($uids as $k => $val) {
-----判断如果是循环的最后一次就加上这个元素
if ($k == $count-1) {
$uids[] = array('uid' => 1000);
}
}
微信扫一扫
$uids = M('user_pid')->where("pid = 2")->field("uid")->select();
$count = count($uids);
foreach ($uids as $k => $val) {
-----判断如果是循环的最后一次就加上这个元素
if ($k == $count-1) {
$uids[] = array('uid' => 1000);
}
}
相关推荐