$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);
}
}