[Solved] Generate random array that is fixed – PHP [closed]
[ad_1] You can explicitly seed the random number generator with the same value each time: $list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; srand(123456); shuffle($list); print_r($list); This will result in the same shuffle each time the script is run. Why this works: array_shuffle() uses the same random number generator that rand() … Read more