random 4 digit number php code example
Example 1: php random number
// $min and $max are optional
rand($min,$max);
Example 2: php randon integer 4 digit
$digits = 3;
echo rand(pow(10, $digits-1), pow(10, $digits)-1);
Example 3: php random number
rand(0,10);
or
random_int(0,10)