$numbers=array(4,6,2,22,11); sort($numbers); ?> rsort() - 對數(shù)組進(jìn)行降序排列 下面的實(shí)例將 $cars 數(shù)組中的元素按照字母降序排列: 實(shí)例 <?php $cars=array("Volvo","BMW","Toyota"); rsort($cars); ?> 下面的實(shí)例將 $numbers 數(shù)組中的元素按照數(shù)字降序排列: 實(shí)例 <?php $numbers=array(4,...
edu.jb51.net/php/php-arra...sort.html 2025-5-25