PHP iterating through a simple comma separated list

后端 未结 7 2053
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-01 03:06

I have a string which can be

$string = \"value.\";

OR

$string = \"value1, value2.\";

I want to iterate th

7条回答
  •  鱼传尺愫
    2021-01-01 03:22

    You should not do 2 and 4. If there is no comma then it will split to an array of one element.

提交回复
热议问题