无法在PHP in_array中搜索数组是否存在多个指针 [英] Can't search an array in PHP in_array for the presence of multiple needles

查看:54
本文介绍了无法在PHP in_array中搜索数组是否存在多个指针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给PHP in_array 一个我要搜索的值数组时,它不起作用.尽管文档指定您可以使用 mixed 针.

When giving PHP in_array an array of values I want to search for, it does not work. Although the documentation specifies that you can give a mixed needle.

因此,基本上,我想测试是否存在多个术语作为数组的值-是否有理由不起作用,有人可以建议另一种方法吗?

So basically I want to test for the presence of multiple terms as the value of an array - is there a reason this is not working, and can anyone suggest another way of doing this?

推荐答案

mixed并不意味着一根以上的针,而是指类型.这是有关多种可能类型的文档讨论.

mixed doesn't mean more than one needle, it refers to types. It's documentation talk for more than one possible type.

这篇关于无法在PHP in_array中搜索数组是否存在多个指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆