Exploding a string twice

前端 未结 3 1793
闹比i
闹比i 2021-01-24 04:17

I have a string composed like this:

87||1|nuovo#88||4|#209|||#89|||#41||1|#5|||#3||1|116#20|||#13||3|#148|||

The pattern is:

3条回答
  •  无人及你
    2021-01-24 05:08

    Sight change to Jiri's code.

    Replace this line

    list($id, $mq, $qr, $tipo) = explode('|', $i);
    

    with

    list($id[], $mq[], $qr[], $tipo[]) = explode('|', $i);
    

提交回复
热议问题