当前位置:网站首页>Array collation commonly used in PHP
Array collation commonly used in PHP
2022-07-28 09:53:00 【MountainYanYL】
PHP Common array functions
// Key names and values of arrays
array_keys() Key in array
array_values() The values in the array
in_array() Determine whether it is in the array
array_key_exists () Whether there is a key
array_flip() Value and key exchange
array_search() Search the array for a given value , If successful, return the corresponding key name
// Segmentation and filling of arrays
array_slice() Take a segment from the array
array_splice() Remove part of the array and replace it with other values
array_pad () Fill the array with a value to the specified length
// Stack And queues
array_push() Element stack
array_pop() Element out of stack
array_shift() Move the beginning of the array out
array_unshift() At the beginning Insert one or more units
// Array sorting
array_multisort() // It can be used to sort multiple arrays at once , Or sort multidimensional arrays according to one or more dimensions .
sort() ksort() krsort()
asort() asort()
// Array calculation
array_sum() Array sum
array_merge () Array merge
array_diff () Difference set of array
array_unique() Remove duplicate values from the array
shuffle() Array scrambling
array_rand() Select one or more cells randomly from the array
compact() Create an array containing keys and values
array_chunk () Divide the array into pairs
边栏推荐
- 478-82(56、128、718、129)
- Method parameter transfer mechanism of C #
- Branches and loops (1)
- FixedWindowRollingPolicy简介说明
- ARouter源码解析(三)
- fastjson中@jsonType注解的功能简介说明
- Leetcode - hashtable topic
- 居家健康诊断时代下,Senzo打造增强侧向流测试产品
- 能够遍历一个文件夹下的所有文件和子文件夹
- With such a simple verification, 80% of programmers can't do it, let alone understand it!
猜你喜欢

Pycharm uses CONDA to call the remote server

路由器固件解密思路

Introduction to SD card (based on spec3.0)

Detailed explanation of various types of files in MySQL

What is cross domain? How to solve the cross domain problem?

NET 3行代码实现文字转语音功能

Domain events and integration events are not so big

Real time editor of MATLAB

居家健康诊断时代下,Senzo打造增强侧向流测试产品

Pulse style | exclusive interview with Committee -- Tencent engineer Zhang Dawei calls you to eat "crab"
随机推荐
[log] what does a log do? What is a log factory? Configuration and use of log4j? log4j. Properties file configuration, log4j jar package coordinates
设计一个支持百万用户的系统
Feign call exception [running, pool size = 10, active threads = 10, queued tasks = 0, completed tasks = n]
Experiment 4 uses fdisk to manage hard disk
数据库高级学习笔记--对象类型
Standing on the shoulders of big men, you can see further
Arouter source code analysis (III)
可以伸缩的搜索栏,模仿华为应用市场
Domain events and integration events are not so big
PlatoFarm几大创新经济模型,给予当下元宇宙市场的启发
常用工具函数 持续更新
使用IdentityServer出现过SameSite Cookie这个问题吗?
ES6新特性
Opencv4.60 installation and configuration
Window source code analysis (II): the adding mechanism of window
Arouter source code analysis (II)
PHP 获取接口的方式
Can multithreading optimize program performance?
Use xposed to crack the software
Analysis of HashSet internal principle