PHP 打乱数组

$arr = array(
array(
"id"=>1,
"name"=>"张三",
"sex"=>"男",
"age"=>22
),
array(
"id"=>3,
"name"=>"李萍",
"sex"=>"女",
"age"=>18
),
array(
"id"=>4,
"name"=>"黄山",
"sex"=>"男",
"age"=>12
),
array(
"id"=>5,
"name"=>"何妹梅",
"sex"=>"女",
"age"=>32
),
array(
"id"=>6,
"name"=>"汤大丰",
"sex"=>"男",
"age"=>35
)
); print_r($arr); shuffle($arr);
echo "<br/>排序后<br/>";
print_r($arr);
die;
上一篇:jquery、js判断复选框是否选中


下一篇:Alamofire源码解读系列(七)之网络监控(NetworkReachabilityManager)