"United States", "IN" => "India", "DE" => "Germany", "ES"">
时间:2021-07-01 10:21:17 帮助过:32人阅读
- php
- $data = array("US" => "United States", "IN"
=> "India", "DE" => "Germany", "ES" =>
"Spain");arsort($data); print_r($data);- ?>
下面是它的输出结果,根据值按字母表顺序进行倒排。将下面的结果与用krsort()函数进行倒排后生成的结果进行比较,就能很容易明白两者的不同了。
Array ([US] => United States
[ES] => Spain
[IN] => India
[DE] => Germany
)
以上介绍的示例就是PHP函数arsort()的具体使用方式。
http://www.bkjia.com/PHPjc/446348.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446348.htmlTechArticle大家在学习 以下Listing F的代码就是PHP函数arsort()的使用示例: ? php $ data = array ("US"= "UnitedStates","IN" = "India","DE"= "Germany","ES"= "Spain");arsort($d...