主页
PHP
PHP shuffle() 函数
tryphp_func_shuffle
运行 ❯
×
更改方向
保存代码
更改主题
<?php $my_array = array("red","green","blue","yellow","purple"); shuffle($my_array); print_r($my_array); ?>
Refresh the page to see how shuffle() randomizes the order of the elements in the array.