separate with commas

前端 未结 7 1909
南方客
南方客 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:32

    Check implode: http://php.net/manual/en/function.implode.php

    Code example: I'm assuming your using some sort of loop?

    $arrUsers = new array();
    
    ... your loop code here ...
    array_push($arrUsers, $row['following_user_id']);
    ... end loop code .. 
    $following_user_id = impload(",", $arrUsers); 
    

提交回复
热议问题