Php code to genereate random number

 How to generate random unique number in php 

Answer
 

The rand() function generates a random integer.
If you want a random integer between 10 and 100 (inclusive), use rand (10,100).

The mt_rand() function produces a better random value, and is 4 times faster than rand().

rand();
or
rand(min,max);