PHP array random sorting example

WBOY
Release: 2016-07-25 08:54:07
Original
1259 people have browsed it
  1. $array = array('A','2','3','4','5','6','7','8','9' ,'10','J','Q','K');
  2. shuffle($array); //Randomly sort the array
  3. print_r($array); //Output array
  4. ?>
Copy code

>>>> Articles you may be interested in: Sharing examples of php associative array sorting and quick sorting php two-dimensional array sorting (example) Summary of PHP array sorting method (Collection) Two examples of php two-dimensional array sorting PHP array sorting example code php array instance array sorting PHP two-dimensional array sorting custom function Examples of application of krsort and asort functions in php array sorting php array sorting example (without built-in functions) php simple array sorting method php multidimensional array sorting example Two methods of php two-dimensional array sorting php multidimensional array sorting



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template