close
[php]shuffle — 將陣列打亂
範例
<?php
$my_array = array("a" => "Dog", "b" => "Cat", "c" => "Horse");
shuffle($my_array);
print_r($my_array);
?>
輸出:
Array ( [0] => Cat [1] => Horse [2] => Dog )
全站熱搜
[php]shuffle — 將陣列打亂
範例
<?php
$my_array = array("a" => "Dog", "b" => "Cat", "c" => "Horse");
shuffle($my_array);
print_r($my_array);
?>
輸出:
Array ( [0] => Cat [1] => Horse [2] => Dog )