function shuffle_assoc($list){
if (!is_array($list))
return $list;
$keys = array_keys($list);
shuffle($keys);
$random = array();
foreach ($keys as $key)
$random[$key] = shuffle_assoc($list[$key]);
return $random;
}
php数组随机排序
最新推荐文章于 2024-12-03 09:19:36 发布