php random 4 digit number code example
Example 1: php random number
// $min and $max are optional
rand($min,$max);
Example 2: php random integer
echo random_int(0,50);
Example 3: generate unique random number php
<?php
$n=range(11,20);
shuffle($n);
for ($x=0; $x< 10; $x++)
{
echo $n[$x].' ';
}
echo "\n"
?>