当前位置:网站首页>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
边栏推荐
- Standing on the shoulders of big men, you can see further
- ArrayList内部原理解析
- Introduction to SD card (based on spec3.0)
- 刚获融资的Espresso Systems,知识产权与团队道德双双陷入困境
- JS array is de duplicated, the ID is the same, and a value is added and merged
- 数据库高级技术学习笔记1--Oracle部署和PL/SQL综述
- Branches and loops (1)
- Window source code analysis (II): the adding mechanism of window
- Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验
- 对象到对象映射-AutoMapper
猜你喜欢

Can multithreading optimize program performance?

Leetcode - hashtable topic

3 minutes to tell you how to become a hacker | zero foundation to hacker getting started guide, you only need to master these five abilities

WPF布局之控件随着窗口等比放大缩小,适应多分辨率满屏填充应用

Pulse style | exclusive interview with Committee -- Tencent engineer Zhang Dawei calls you to eat "crab"

Database core system

Method parameter transfer mechanism of C #

设计一个支持百万用户的系统

matlab基本操作

软件测试与质量学习笔记1---黑盒测试
随机推荐
ECCV 2022 | can be promoted without fine adjustment! Registration based anomaly detection framework for small samples
软件测试与质量学习笔记2----黑盒测试
Learn a hammer.Net zero foundation reverse tutorial lesson 3 (shell and homework)
Create SSL certificate using OpenSSL
DAO社区的胜利,Tiger DAO VC胜在治理与共识
一文读懂Plato Farm的ePLATO,以及其高溢价缘由
SD卡介绍(基于SPEC3.0)
设计一个支持百万用户的系统
LeetCode - 哈希表专题
Experiment 5: user and user group management
What is cross domain? How to solve the cross domain problem?
Retrofit源码解析
SizeBasedTriggeringPolicy简介说明
超级原始人系列盲盒即将上线,PlatoFarm赋能超多权益
ARouter源码解析(三)
go语言切片Slice和数组Array对比panic runtime error index out of range问题解决
Machine learning (10) -- hypothesis testing and regression analysis
ASP.NET Core 6框架揭秘实例演示[29]:搭建文件服务器
数据库高级技术学习笔记1--Oracle部署和PL/SQL综述
PlatoFarm进展不断,接连上线正式版以及推出超级原始人NFT