当前位置:网站首页>PHP determines whether an array contains the value of another array
PHP determines whether an array contains the value of another array
2022-07-06 00:09:00 【Enron 303】
in_array() function
Briefly :in_array($needle, $array[, $strict = FALSE])
Altogether 3 Parameters ,
The first parameter is the value to check ( the latter ), It can be an array or a specific value .
The second parameter is the array to check ( The former ), ditto .
The third one doesn't have to write , The default is false, It's written in true We have to compare whether the data types are the same .
I think the third one is very necessary . Sometimes there will be problems if you don't write .
Another basic usage is that an array contains a value , But if you want to include another array , Only when another array is a complete subarray of the original array , I tried some that should be like this . There are cases in the link at the beginning . Be sure to look at the case !
if(in_array('SB',$params,true))
{
echo ' There are illegal characters ';
}
边栏推荐
- shardingsphere源码解析
- Upgrade openssl-1.1.1p for openssl-1.0.2k
- mysql-全局锁和表锁
- MySql——CRUD
- [gym 102832h] [template] combination lock (bipartite game)
- 什么叫做信息安全?包含哪些内容?与网络安全有什么区别?
- [EF core] mapping relationship between EF core and C data type
- 激光slam学习记录
- Yunna | what are the main operating processes of the fixed assets management system
- 转:未来,这样的组织才能扛住风险
猜你喜欢
XML配置文件(DTD详细讲解)
Qt QPushButton详解
上门预约服务类的App功能详解
There is no network after configuring the agent by capturing packets with Fiddler mobile phones
用列錶初始化你的vector&&initializer_list簡介
Zhongjun group launched electronic contracts to accelerate the digital development of real estate enterprises
Zero rhino technology joined hands with the intelligence Club: the "causal faction" forum was successfully held, and the "causal revolution" brought the next generation of trusted AI
PV静态创建和动态创建
Huawei equipment configuration ospf-bgp linkage
Gd32f4xx UIP protocol stack migration record
随机推荐
跟着CTF-wiki学pwn——ret2libc1
JS 这次真的可以禁止常量修改了!
Mathematical model Lotka Volterra
Global and Chinese markets of universal milling machines 2022-2028: Research Report on technology, participants, trends, market size and share
上门预约服务类的App功能详解
【luogu CF487E】Tourists(圆方树)(树链剖分)(线段树)
JS can really prohibit constant modification this time!
China Jinmao online electronic signature, accelerating the digitization of real estate business
Open3D 点云随机添加噪声
从底层结构开始学习FPGA----FIFO IP核及其关键参数介绍
[gym 102832h] [template] combination lock (bipartite game)
如何解决ecology9.0执行导入流程流程产生的问题
Which side projects can be achieved? Is it difficult for we media to earn more than 10000 a month?
Single merchant v4.4 has the same original intention and strength!
NSSA area where OSPF is configured for Huawei equipment
剖面测量之提取剖面数据
云呐|固定资产管理系统主要操作流程有哪些
【二叉搜索树】增删改查功能代码实现
MySql——CRUD
认识提取与显示梅尔谱图的小实验(观察不同y_axis和x_axis的区别)