"United States", "IN" => "India", "DE" => "Germany", "ES" => "Spain");ksort(">
时间:2021-07-01 10:21:17 帮助过:23人阅读
- php
- $data = array("US" => "United States",
"IN" => "India", "DE" => "Germany", "ES" =>
"Spain");ksort($data); print_r($data);- ?>
它的输出结果如下:
Array ([DE] => Germany
[ES] => Spain
[IN] => India
[US] => United States
)
通过上面例子的介绍,希望大家能清楚PHP函数Ksort()的具体使用。
http://www.bkjia.com/PHPjc/446350.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/446350.htmlTechArticle我们在学习 Listing C的具体代码如下: ? php $ data = array ("US"= "UnitedStates", "IN"= "India","DE"= "Germany","ES"= "Spain");ksort($data);print_r($data); ? 它的输出...