How to Generate 6 Digit Unique Random Numbers in PHP?

Generate a 6 Digit Unique Number using PHP, Generate a 6 Digits Random Number using PHP, PHP rand() Function, Using the PHP Rand() Functions, Get 6 Digits Random Number in PHP, Create six Digits Random Number Using PHP, six Digit Unique Number Generate in PHP

mt_rand(100000,999999); This is the inbuild function of a php, you can generate a random number of 6 digit through it.
So let us know how this function is used.

$randomid = mt_rand(100000,999999); 
echo $randomid;