案例:PHP案例     状态:不可编辑再运行    进入竖版
 运行结果 
x
 
1
<?php
2
$age=array("Bill"=>"35","Steve"=>"37","Peter"=>"43");
3
ksort($age);
4
5
foreach($age as $x=>$x_value)
6
    {
7
    echo "Key=" . $x . ", Value=" . $x_value;
8
    echo "\n";
9
    }
10
?>