How to split a string by multiple delimiters in PHP?

前端 未结 4 1230
温柔的废话
温柔的废话 2020-11-28 13:16

\"something here ; and there, oh,that\'s all!\"

I want to split it by ; and ,

so after processing should get:

4条回答
  •  星月不相逢
    2020-11-28 13:46

    You can get the values into an array using Devin's or Meder's method.

    To get the output you want, you could probably do this

    echo implode("\n", $resultingArray);
    

    Or use
    if it's HTML you want.

提交回复
热议问题