Home > Backend Development > PHP Tutorial > PHP array sort function_PHP tutorial

PHP array sort function_PHP tutorial

WBOY
Release: 2016-07-21 14:52:22
Original
1139 people have browsed it

sort: This function assigns new key names to the cells in the array. This will delete the original keys rather than just reorder them.

rsort: This function sorts the array in reverse order (highest to lowest). Delete the original key names instead of just reordering them.

asort: Sort the array and maintain the index relationship

arsort: Sort the array in reverse and maintain the index relationship

ksort: Sort the array according to the key name, retaining the association between the key name and the data

krsort: Sort the array in reverse order by key name, retaining the association between key name and data

natsort: Sort alphanumeric strings while maintaining original key/value associations

natcasesort: Same as natsort sorting algorithm, but case-insensitive sorting

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/371578.htmlTechArticlesort: This function assigns new key names to the cells in the array. This will delete the original keys rather than just reorder them. rsort: This function sorts the array in reverse order (highest to lowest). ...
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template