I have an array of over 1000s keys in PHP which I want to randomize. I am currently using shuffle to do this, however I want the shuffled order to be the same everytime. So, random but always in the same random order everytime the script is ran.
It's a client request :). Randomize, but keep it the same random order everytime.
Call srand(int seed)
first, with a constant. e.g. srand(123)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With