Home > php教程 > php手册 > body text

PHP数组处理函数概览

WBOY
Release: 2016-06-13 11:06:38
Original
1266 people have browsed it

我们今天为初学PHP数组处理函数array: 建立一个新的数组。

array_walk: 让用户自订函数能处理数组中的每一个元素。

arsort: 将数组的值由大到小排序。

asort: 将数组的值由小到大排序。

count: 计算变量或数组中的元素个数。

current: 返回数组中目前的元素。

each: 返回数组中下一个元素的索引及值。

end: 将数组的内部指针指到最后的元素。

key: 取得数组中的索引资料。

PHP数组处理函数ksort: 将数组的元素依索引排序。

list: 列出数组中元素的值。

next: 将数组的内部指针向后移动。

pos: 返回数组目前的元素。

prev: 将数组的内部指针往前移动。

range: 建立一个整数范围的数组。

reset: 将数组的指针指到数组第一个元素。

rsort: 将数组的值由大到小排序。

shuffle: 将数组的顺序弄混。

sizeof: 获知数组的大小。

sort: 将数组排序。

uasort: 将数组依用户自定的函数排序。

uksort: 将数组的索引依用户自定的函数排序。

PHP数组处理函数usort: 将数组的值依用户自定的函数排序。


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!