PHP case-insensitive explode()

前端 未结 3 1043
星月不相逢
星月不相逢 2021-01-17 13:39

I have the following code:

explode(\"delimiter\", $snippet);

But I want that my delimiter is case-insensitive.

3条回答
  •  滥情空心
    2021-01-17 14:34

    explode('delimiter',strtolower($snippet));
    
    1. Never use expensive regular expressions when more CPU affordable functions are available.

    2. Never use double-quotes unless you explicitly have a use for mixing variables inside of strings.

提交回复
热议问题