I am trying to generate 6 numbers in an array, I'm using the mt_rand function, however I can't have the same number in the array. How would I go about checking for this and generating the number again?
I've thought about making a duplicate array and looping throw and counting how many are in the array, if its more then 1 then re generating the numbers and checking again, however this just seems like a lot of work for something that php might have a native function for that I can't find...
The duplicate thing isn't what I need help with, that is checking the key to the value, I need all values to be unique.