123----456----789 000----111----222 222----333----123 比如我要分割这种格式的文本应该怎么写呢
angryTom2019-07-16 15:58:46
$pizza = "piece1----piece2----piece3----piece4----piece5---- piece6"; $pieces = explode("----", $pizza); echo $pieces[1];
You can try PHP's explode() method to split the string into arrays according to the specified characters.