3 回答
TA贡献1820条经验 获得超9个赞
尝试这个
$phone ='';
while($row = $get_result->fetch_assoc())
{
if($phone && $row['dnr_phone']) {
$phone .= ',';
}
$phone .=$row['dnr_phone'];
}
echo $phone;
TA贡献1799条经验 获得超8个赞
if($count > 0)
{
$phone ='';
while($row = $get_result->fetch_assoc())
{
if($phone==''){
$phone .=$row['dnr_phone'];
}else{
$phone .=','.$row['dnr_phone'];
}
echo $phone;
}
sendSMS("Pname",$phone,$message);
}
TA贡献1872条经验 获得超3个赞
$phone在while循环之外声明变量
$phone ='';
while($row = $get_result->fetch_assoc())
{
if($phone) {
$phone .=','.$row['dnr_phone'];
} else {
$phone .=$row['dnr_phone'];
}
echo $phone;
}
- 3 回答
- 0 关注
- 212 浏览
添加回答
举报