How to split this array
小乔
小乔 2019-07-01 09:57:12
0
7
1251
"images": [ "1,2,3" ]

I want to split it into ['img':1,img:2,img:3]

小乔
小乔

reply all (4)
勇敢的心

This is in json format, you have to convert it into an array first and then process it

    小破孩

    list(img_one,img_two,img_three) = explode(',',$image);

    Try it out

    • reply OK, thanks
      小乔 author 2019-07-01 15:02:23
    小乔

    Doesn't seem to work

    • reply Is this js?
      ringa_lee author 2019-07-01 11:13:20
    • reply It's not js, it's the content in the database
      小乔 author 2019-07-01 15:01:56
    ringa_lee

    array_flip, just apply this function

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!