separate with commas

前端 未结 7 2028
南方客
南方客 2021-01-29 13:45

hey there I have this,

$following_user_id .= $row[\'following_user_id\'];

and I get

44443344330

then I use th

7条回答
  •  耶瑟儿~
    2021-01-29 14:37

    Collect your data into an array of strings and use the implode function:

    $uids = array();
    while($row = mysql_fetch_assoc($result)){
        array_push($uids, $row['following_user_id']);
    }
    $following_user_id = implode(',', $uids);
    

提交回复
热议问题