Php array random sorting implementation method, php array sorting. Php array random sorting implementation method. php array sorting this article describes the php array random sorting implementation method. Share it with you for your reference. The specific implementation method is as follows: php $ array php random sorting implementation method, php array sorting
This article describes how to implement random sorting of php arrays. Share it with you for your reference. The specific implementation method is as follows:
<? Php $ array = array ('A', '2', '3', '4', '5', '6', '7', '8 ', '9', '10', 'J', 'Q', 'k'); shuffle ($ array); // random sorting array print_r ($ array ); // output array?>
The running result is as follows:
Array ([0] => Q [1] => 3 [2] => 5 [3] => 2 [4] => 10 [5] => 9 [6] => K [7] => 4 [8] => J [9] => 6 [10] => 7 [11] => 8 [12] =>)
I hope this article will help you with php programming.
Examples in this article describes how to implement random sorting of php arrays. Share it with you for your reference. The specific implementation method is as follows: php $ array...