为什么数据用arsort排序没反应?

WBOY
Release: 2016-06-23 14:05:53
Original
1186 people have browsed it

 数组内容如下,是一位数组,数组名为$finalData。
Array ( [追求准确] => 1 [适应力强] => 2 [精于分析] => 2 [眼光广阔] => 2 [冷静自信] => 2 [体贴入微] => 2 [鞭策鼓励] => 2 [聪颖过人] => 2 [力争上游] => 2 [恪尽职守] => 2 [深明主次] => 2 [广纳意见] => 2 [忠于合作] => 2 [别具创意] => 2 [待人周到] => 2 [严于律己] => 2 [效率极高] => 2 [善于鼓励] => 1 [有魄力的] => 1 [有始有终] => 1 [努力推进] => 1 [富想像力] => 1 [不偏不倚] => 3 [颠覆性创新] => 1 [博闻好问] => 1 [见识广博] => 0 [逻辑清晰] => 0 [忠诚可靠] => 0 [观察入微] => 0 [善用机会] => 0 [别出心裁] => 0 [爽朗外向] => 0 [坦率直言] => 0 [注重细节] => 0 [坚持不懈] => 0 [令人信服] => 1 [踏实肯干] => 1 [敬业乐业] => 1 [注重现实] => 1 [信赖自己] => 1 [头脑精明] => 1 [专心致志] => 1 [技艺精良] => 1 [坚强不屈] => 1 [有条不紊] => 1 [专横跋扈] => 1 [吹毛求疵] => 1 [颇不耐烦] => 1 [争权结党] => 1 [反复无常] => 1 [退缩忍让] => 1 [粗心善忘] => 1 [畏首畏尾] => 1 [小题大做] => 1 [缺乏耐性] => 1 [冲动莽撞] => 1 [犹豫不决] => 1 [欠缺弹性] => 1 [刻板保守] => 1 [不思进取] => 0 [玩弄权术] => 0 [待人冷漠] => 1 [过于敏感] => 1 [口舌招尤] => 1 [不善委派] => 1 [抱残守阙] => 1 [猜忌多疑] => 1 [行动迟缓] => 1 [山头主义] => 1 [离经叛道] => 0 [不敢尝试] => 0 [不切实际] => 0 )

应用PHP的排序函数 

$finalData= arsort($finalData);print_r($finalData);
Copy after login

但是最终得不到任何结果。
请问有谁遇到过这样的问题么?或者我的数组有什么问题么?


回复讨论(解决方案)

arsort($finalData);print_r($finalData);//arsort返回值:是否排序成功,而不是排序成功后的数组
Copy after login

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!