How to find all substrings of a string in PHP

前端 未结 9 995
悲&欢浪女
悲&欢浪女 2020-12-11 06:05

I need to convert strings of the form

\"a b c\"

into arrays of the form

Array
(
    [0] => a
    [1] => a b
    [2] =         


        
9条回答
  •  一生所求
    2020-12-11 06:37

    They can already be thought of arrays of that form.

    Simply address the contents with a function that takes the index as a parameter and returns the string sliced appropriately.

提交回复
热议问题