最适合网络开发者的网站

PHP 教程

PHP 主页 PHP 简介 PHP 安装 PHP 语法 PHP 注释 PHP 变量 PHP 回显/打印 PHP 数据类型 PHP 字符串 PHP 数字 PHP 数学 PHP 常量 PHP 运算符 PHP 如果...否则...Elseif PHP 开关 PHP 循环 PHP 函数 PHP 数组 PHP 超全局变量 PHP 正则表达式

PHP 形式

PHP 表单处理 PHP 表单验证 需要 PHP 表单 PHP 表单 URL/电子邮件 PHP 表单完成

PHP 先进的

PHP 日期和时间 PHP 包含 PHP 文件处理 PHP 文件打开/读取 PHP 文件创建/写入 PHP文件上传 PHP 饼干 PHP 会话 PHP 过滤器 PHP 过滤器高级 PHP 回调函数 PHP 的 JSON PHP 异常

PHP 面向对象

PHP 什么是OOP PHP 类/对象 PHP 构造函数 PHP 析构函数 PHP 访问修饰符 PHP 继承 PHP 常量 PHP 抽象类 PHP 接口 PHP 特征 PHP 静态方法 PHP 静态属性 PHP 命名空间 PHP 可迭代对象

MySQL 数据库

MySQL 数据库 MySQL 连接 MySQL 创建数据库 MySQL 创建表 MySQL 插入数据 MySQL 获取最后一个 ID MySQL 插入多个 MySQL 已准备 MySQL 选择数据 MySQL 哪里 MySQL 排序依据 MySQL 删除数据 MySQL 更新数据 MySQL 限制数据

PHP XML

PHP XML 解析器 PHP SimpleXML 解析器 PHP SimpleXML - 获取 PHP XML 扩展 PHP XML DOM

PHP - 阿贾克斯

AJAX 简介 AJAX PHP AJAX 数据库 AJAX XML AJAX实时搜索 AJAX 民意调查

PHP 例子

PHP 示例 PHP 编译器 PHP 测验 PHP 练习 PHP 证书

PHP 参考

PHP 概述 PHP 数组 PHP 日历 PHP 日期 PHP 目录 PHP 错误 PHP 异常 PHP 文件系统 PHP 过滤器 PHP FTP PHP 的 JSON PHP 关键字 PHP 库 PHP 邮件 PHP 数学 PHP 杂项 PHP MySQLi PHP 网络 PHP 输出控件 PHP 正则表达式 PHP 简单 XML PHP 流 PHP 字符串 PHP 变量处理 PHP XML解析器 PHP 压缩文件 PHP 时区

PHP。初学者课程

尿素

PHP Array Functions


PHP Array Introduction

The array functions allow you to access and manipulate arrays.

Simple and multi-dimensional arrays are supported.


Installation

The array functions are part of the PHP core. There is no installation needed to use these functions.


PHP Array Functions

Function 描述
大批() Creates an array
数组更改键值() Changes all keys in an array to lowercase or uppercase
array_chunk() Splits an array into chunks of arrays
数组列() Returns the values from a single column in the input array
数组合并() Creates an array by using the elements from one "keys" array and one "values" array
数组计数值() Counts all the values of an array
数组差异() Compare arrays, and returns the differences (compare values only)
数组差异() Compare arrays, and returns the differences (compare keys and values)
数组差异键() Compare arrays, and returns the differences (compare keys only)
数组_diff_uassoc() Compare arrays, and returns the differences (compare keys and values, using a user-defined key comparison function)
数组_diff_ukey() Compare arrays, and returns the differences (compare keys only, using a user-defined key comparison function)
数组填充() Fills an array with values
数组填充键() Fills an array with values, specifying keys
数组过滤器() Filters the values of an array using a callback function
数组翻转() Flips/Exchanges all keys with their associated values in an array
数组相交() Compare arrays, and returns the matches (compare values only)
数组相交() Compare arrays and returns the matches (compare keys and values)
数组相交键() Compare arrays, and returns the matches (compare keys only)
数组相交() Compare arrays, and returns the matches (compare keys and values, using a user-defined key comparison function)
数组相交_ukey() Compare arrays, and returns the matches (compare keys only, using a user-defined key comparison function)
数组键存在() Checks if the specified key exists in the array
数组键() Returns all the keys of an array
数组映射() Sends each value of an array to a user-made function, which returns new values
数组合并() Merges one or more arrays into one array
array_merge_recursive() Merges one or more arrays into one array recursively
array_multisort() Sorts multiple or multi-dimensional arrays
数组填充() Inserts a specified number of items, with a specified value, to an array
数组弹出() Deletes the last element of an array
数组乘积() Calculates the product of the values in an array
数组推送() Inserts one or more elements to the end of an array
数组随机数() Returns one or more random keys from an array
数组_reduce() Returns an array as a string, using a user-defined function
数组替换() Replaces the values of the first array with the values from following arrays
array_replace_recursive() Replaces the values of the first array with the values from following arrays recursively
array_reverse() Returns an array in the reverse order
数组搜索() Searches an array for a given value and returns the key
数组移位() Removes the first element from an array, and returns the value of the removed element
数组切片() Returns selected parts of an array
数组拼接() Removes and replaces specified elements of an array
数组总和() Returns the sum of the values in an array
数组_udiff() Compare arrays, and returns the differences (compare values only, using a user-defined key comparison function)
数组_udiff_assoc() Compare arrays, and returns the differences (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)
数组_udiff_uassoc() Compare arrays, and returns the differences (compare keys and values, using two user-defined key comparison functions)
数组_uintersect() Compare arrays, and returns the matches (compare values only, using a user-defined key comparison function)
数组uintersect_assoc() Compare arrays, and returns the matches (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)
数组_uintersect_uassoc() Compare arrays, and returns the matches (compare keys and values, using two user-defined key comparison functions)
数组唯一() Removes duplicate values from an array
数组取消移动() Adds one or more elements to the beginning of an array
数组值() Returns all the values of an array
数组遍历() Applies a user function to every member of an array
array_walk_recursive() Applies a user function recursively to every member of an array
arsort() Sorts an associative array in descending order, according to the value
排序() Sorts an associative array in ascending order, according to the value
袖珍的() Create array containing variables and their values
数数() Returns the number of elements in an array
当前的() Returns the current element in an array
每个() Deprecated from PHP 7.2. Returns the current key and value pair from an array
结尾() Sets the internal pointer of an array to its last element
提炼() Imports variables into the current symbol table from an array
数组中 Checks if a specified value exists in an array
钥匙() Fetches a key from an array
krsort() Sorts an associative array in descending order, according to the key
排序() Sorts an associative array in ascending order, according to the key
列表() Assigns variables as if they were an array
natcasesort() Sorts an array using a case insensitive "natural order" algorithm
natsort() Sorts an array using a "natural order" algorithm
下一个() Advance the internal array pointer of an array
pos() Alias of 当前的()
上一页() Rewinds the internal array pointer
范围() Creates an array containing a range of elements
重置() Sets the internal pointer of an array to its first element
rsort() Sorts an indexed array in descending order
洗牌() Shuffles an array
sizeof() Alias of 数数()
种类() Sorts an indexed array in ascending order
uasort() Sorts an array by values using a user-defined comparison function
uksort() Sorts an array by keys using a user-defined comparison function
usort() Sorts an array using a user-defined comparison function