当前位置:网站首页>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 ';
}
边栏推荐
- C # input how many cards are there in each of the four colors.
- Learn PWN from CTF wiki - ret2libc1
- JVM details
- 从底层结构开始学习FPGA----FIFO IP核及其关键参数介绍
- How much do you know about the bank deposit business that software test engineers must know?
- Cloudcompare & PCL point cloud randomly adds noise
- Shardingsphere source code analysis
- Wechat applet -- wxml template syntax (with notes)
- C file and folder operation
- 15 MySQL stored procedures and functions
猜你喜欢

20220703 week race: number of people who know the secret - dynamic rules (problem solution)

Zhongjun group launched electronic contracts to accelerate the digital development of real estate enterprises

PV static creation and dynamic creation

My colleagues quietly told me that flying Book notification can still play like this

FFmpeg学习——核心模块

Open source CRM customer relationship system management system source code, free sharing

总结了 800多个 Kubectl 别名,再也不怕记不住命令了!

软件测试工程师必会的银行存款业务,你了解多少?

FFMPEG关键结构体——AVCodecContext

After summarizing more than 800 kubectl aliases, I'm no longer afraid that I can't remember commands!
随机推荐
JVM details
云呐|固定资产管理系统主要操作流程有哪些
单商户V4.4,初心未变,实力依旧!
[designmode] adapter pattern
【GYM 102832H】【模板】Combination Lock(二分图博弈)
FFmpeg学习——核心模块
数据库遇到的问题
DEJA_VU3D - Cesium功能集 之 055-国内外各厂商地图服务地址汇总说明
Make a short video clip number of we media film and television. Where can I download the material?
N1 # if you work on a metauniverse product [metauniverse · interdisciplinary] Season 2 S2
wx. Getlocation (object object) application method, latest version
【DesignMode】适配器模式(adapter pattern)
Hardware and interface learning summary
[EF core] mapping relationship between EF core and C data type
The global and Chinese markets of dial indicator calipers 2022-2028: Research Report on technology, participants, trends, market size and share
FFMPEG关键结构体——AVCodecContext
C file and folder operation
云呐|固定资产管理系统功能包括哪些?
Cloudcompare & PCL point cloud randomly adds noise
【NOI模拟赛】Anaid 的树(莫比乌斯反演,指数型生成函数,埃氏筛,虚树)