array_rand() not really random

array_rand() not really random

Let’s face it, it’s not very random.

to fix it
before sending your array to array_rand() do this

srand();shuffle($array_name);

Leave a Reply

Your email address will not be published. Required fields are marked *