Checking for multiple strpos values

后端 未结 7 1925
陌清茗
陌清茗 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:38

    If all value is seperated by a space in value then you can do the following. Otherwise ignore it.

    It is needed because if you have $color="25"; then strpos will found both 2, 5 and 25 so required result will not come

    
    

提交回复
热议问题