Checking for multiple strpos values

后端 未结 7 1934
陌清茗
陌清茗 2021-01-05 05:51

I am wondering how to complete multiple strpos checks.

Let me clarify:
I want strpos to check the variable \"COLOR\" to see if any numbers fro

7条回答
  •  鱼传尺愫
    2021-01-05 06:39

    try preg match for multiple

    if (preg_match('/word|word2/i', $str))
    

    strpos() with multiple needles?

提交回复
热议问题