源代码:
"red","b"=>"green","c"=>"blue","d"=>"yellow","e"=>"purple"); shuffle($my_array); print_r($my_array); ?>
Refresh the page to see how shuffle() randomizes the order of the elements in the array.
运行结果:
Array ( [0] => purple [1] => red [2] => blue [3] => green [4] => yellow )
Refresh the page to see how shuffle() randomizes the order of the elements in the array.