PHP Array in to comma separated list

前端 未结 4 952
灰色年华
灰色年华 2021-01-14 04:42

I have a list of items from a database being parse in an array

Array
(
    [0] => Array
        (
            [dToken] => 731fea87ea9dc61f16e93f1ad2b96         


        
4条回答
  •  臣服心动
    2021-01-14 05:19

    callback = function($row){
        return $row['dToken'];
    }
    
    implode(",",array_map(callback,$result));
    

提交回复
热议问题