15万
47万
管理员
第一种对字符串数组进行排序
$text = array("apple","orange","pear"); sort($text); print_r($text);
输出的结果
第二种,对数字的数组进行排序(升序sort,降序rsort)
$text = arrray(8,7,6,2,5,1); sort($text); print_r($text);
不能对汉字进行排序
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
|Archiver|手机版|小黑屋|宜信同城网交流论坛 ( 闽ICP备19021048号 )
GMT+8, 2026-8-2 11:27 , Processed in 0.028290 second(s), 13 queries , Redis On.
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.