Author: Admin 09/11/2022
Language:
PHP
Tags: php shuffle array
Randomizes the order of the elements in an array.
This function shuffles (randomizes the order of the elements in) an array. It uses a pseudo random number generator that is not suitable for cryptographic purposes.
<?php
$numbers = range(1, 20);
shuffle($numbers);
foreach ($numbers as $number) {
echo "$number ";
}
?>
Read more PHP: shuffle - Manual