four digit random number php code example
Example 1: php randon integer 4 digit
$digits = 3;
echo rand(pow(10, $digits-1), pow(10, $digits)-1);
Example 2: php random integer
echo random_int(0,50);
$digits = 3;
echo rand(pow(10, $digits-1), pow(10, $digits)-1);
echo random_int(0,50);