PHP array Sort function

Source: Internet
Author: User
Tags array sort arrays sort

Sort: This function assigns a new key name to the cell in the array. This deletes the original key name and not just the reordering.

Rsort: This function is reversed (highest to lowest) in the array. Deletes the original key name and not just the reordering.

Asort: Sorting arrays and keeping index relationships

Arsort: Reverse-sort the array and keep the index relationship

Ksort: Arrays are sorted by key name, preserving association of key names to data

Krsort: Arrays are sorted in reverse by key names, preserving the association of key names to data

Natsort: Sort alphanumeric strings and keep the existing key/value associations

Natcasesort: The same natsort sort algorithm, but not case-sensitive alphabetical sorting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.