菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码
运行
保存
<html> <body> <?php $age=array("Peter"=>"35","Ben"=>"37","Joe"=>"43"); arsort($age); foreach($age as $x=>$x_value) { echo "Key=" . $x . ", Value=" . $x_value; echo "<br>"; } ?> </body> </html>
运行结果
<!DOCTYPE html> <html> <body> Key=Joe, Value=43<br>Key=Ben, Value=37<br>Key=Peter, Value=35<br> </body> </html>