6 digit random number generator 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 number generator
<?php
echo rand(1,50);
?>
$digits = 3;
echo rand(pow(10, $digits-1), pow(10, $digits)-1);
<?php
echo rand(1,50);
?>