How to grab seperated integers from long string

前端 未结 3 1773
误落风尘
误落风尘 2020-12-22 05:58

I am working on a enrollment system for a judo club. I am using a string to store the ID\'s of people, who showed up. It looks somthing like this:

0,3,4,7,8,10,

3条回答
  •  遥遥无期
    2020-12-22 06:36

    use EXPLODE

    $num = "0,3,4,7,8,10";
    $pieces = explode(",", $num );
    
    • Explode Manual

提交回复
热议问题