php: check if array contains either of values

前端 未结 0 482
别跟我提以往
别跟我提以往 2020-12-03 14:11

I can check if an array contains one value:

if (in_array($string1, $array, true))

To check for multiple values, I can simply do:



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题