Why does the data not respond with the arsort sort?

Source: Internet
Author: User
The contents of the array are as follows, an array named $finaldata.
Array ([quest for accuracy] = 1 [Adaptable] = 2 [expert analysis] + 2 [broad vision] + 2 [cool self-confidence] + 2 [considerate] + 2 [spur encouragement] and 2 [smart] = > 2 [up] + 2 [dedication] = 2 [Deep Ming and Primary] + 2 [Kwong na opinion] + 2 [loyal to cooperation] + 2 [creative] + 2 [treat people thoughtful] + 2 [discipline] =&G T 2 [very efficient] + 2 [good encouragement] = 1 [bold] + 1 [finish] + 1 [push forward] = 1 [imaginative] + 1 [unbiased] + 3 [disruptive innovation] + 1 [UBM Good question] + 1 [Insight] = 0 [logic Clear] + 0 [loyal and reliable] + 0 [observation] + 0 [opportunity] + 0 [ingenuity] = 0 [hearty outward] + 0 [ Candid] + 0 [attention to detail] + 0 [perseverance] + 0 [convincing] + 1 [practical work] + 1 [dedication] + 1 [Reality] + 1 [Trust yourself] + 1 [Mind Smart] = 1 [absorbed] = 1 [excellent] + 1 [unyielding] + 1 [methodical] = 1 [bossy] + 1 [Critical] = 1 [quite impatient] + 1 [Dominion Knot Party ] = 1 [capricious] = 1 [Retreat forbearance] + 1 [careless forgetting] = 1 [timid] + 1 [fuss] + 1 [lack of patience] = 1 [Impulse recklessness] and 1 [indecision] + 1 [inflexible] + 1 [rigid conservative] + 1 [not aggressive] + 0 [play politics] + 0 [Indifference] = 1 [too sensitive] + 1 [tongue-in-mouth] + 1 [Poor delegation] =& Gt 1 [holding the remnant] = 1[Suspicious suspicion] = 1 [slow action] = 1 [Hill doctrine] = 1 [deviant] + 0 [Dare not try] + 0 [impractical] + 0)

Apply the sort function of PHP
$finalData = Arsort ($finalData);p rint_r ($finalData);

But in the end there was no result.
Has anyone ever met such a problem? Or is there something wrong with my array?


Reply to discussion (solution)

Arsort ($finalData);p rint_r ($finalData);//arsort return value: Whether the sort succeeds, not the sorted array
  • 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.