separate with commas

前端 未结 7 1923
南方客
南方客 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条回答
  •  旧时难觅i
    2021-01-29 14:39

    You can split the string into an array of characters, then implode the array.

    $array = preg_split('//', $following_user_id, -1, PREG_SPLIT_NO_EMPTY);
    
    echo implode( ',', $array );
    

提交回复
热议问题