I want to explode a variable in a little different way

前端 未结 5 1934
遇见更好的自我
遇见更好的自我 2021-02-04 01:30

I have this variable.

$var = \"A,B,C,D,\'1,2,3,4,5,6\',E,F\";

I want to explode it so that I get the following array.

array(
[0         


        
5条回答
  •  北海茫月
    2021-02-04 02:04

    You need to explode the string to array.

    But, you need commas after every element except last one.

    Here is working example:

    Demo

提交回复
热议问题