PHP shuffle() function is used to shuffle the keys of array elements means it change the order of array items randomly and assigns new keys. It is an inbuilt function of PHP.
$array is a PHP array.
The return type of this function is Boolean means it can return either TRUE or FALSE. It returns 1 on success and 0 on failure.
<?php $arr1 = array(1,2,3,4,5,6,7,8,9); echo "<pre>"; echo "array before using shuffle function <br>"; print_r ($arr1); shuffle($arr1); echo "<br> Array after using shuffle function. <br>"; print_r($arr1); ?>