Why does data sorting by arsort fail?

Source: Internet
Author: User
Why does data sorting by arsort fail? The array is an array named $ finalData.
Array ([accuracy] => 1 [strong adaptability] => 2 [excellent analysis] => 2 [broad vision] => 2 [calm and confident] => 2 [considerate] => 2 [spur encouragement] => 2 [brilliant person] => 2 [strive for upstream] => 2 [fulfill your duties] => 2 [Shen Ming primary and secondary] => 2 [Guang na comments] => 2 [loyal to cooperation] => 2 [creative] => 2 [considerate] => 2 [strict with yourself] => 2 [highly efficient] => 2 [good encouragement] => 1 [bold] => 1 [beginning and end] => 1 [hard work] => 1 [rich imagination] => 1 [unbiased] => 3 [disruptive innovation] => 1 [good news and good questions] => 1 [extensive knowledge] => 0 [clear logic] => 0 [loyal and reliable] => 0 [observation into the micro] => 0 [make good use of opportunities] => 0 [ingenious] => 0 [strong and outgoing] => 0 [Frank and bluntly] => 0 [focus on details] => 0 [perseverance] => 0 [convincing] => 1 [steadfast and willing to work] => 1 [professional and happy] => 1 [focus on reality] => 1 [trust yourself] => 1 [smart mind] => 1 [dedicated mind] => 1 [excellent skills] => 1 [strong and unyielding] => 1 [methodical] => 1 [arrogant] => 1 [nitpicking] => 1 [impatient] => 1 [dispute over power to final the party] => 1 [capricious] => 1 [retreat and endure] => 1 [carelessness and good fortune] => 1 [fear and fear] => 1 [Tips] => 1 [lack of patience] => 1 [impulsive and reckless] => 1 [hesitant] => 1 [lack of elasticity] => 1 [rigid and conservative] => 1 [do not think ahead] => 0 [play with authority] => 0 [treat people with indifference] => 1 [too sensitive] => 1 [speak out your tongue] => 1 [misdelegate] => 1 [hold the defects] => 1 [suspicion and suspicion] => 1 [slow action] => 1 [Mountain View] => 1 [defect] => 0 [dare not try] => 0 [impractical] => 0)

Sort functions using PHP
$finalData= arsort($finalData);print_r($finalData);

However, no results are obtained.
Who has encountered such a problem? Or is there any problem with my array?


Reply to discussion (solution)

Arsort ($ finalData); print_r ($ finalData); // returned value of arsort: whether the sorting is successful, not the array after the sorting is successful

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.