How to transform json data to a comma separated php string?

后端 未结 3 472
情歌与酒
情歌与酒 2021-01-20 14:03

Let\'s say i have this json data. How to transform the \"tags\" to a string like

$tags = \"Rihanna, We, Found, Love, (Explicit), Def, Jam, Records, Pop\";

3条回答
  •  Happy的楠姐
    2021-01-20 14:32

    It looks like you need implode(). The function would be something like...

    $tags = implode(', ', $videosDatas['videos'][$i]['tags']);
    

提交回复
热议问题