Question : generate random number of 4 digit in php
Answered by : ankur-prajapati
<?php
$FourDigitRandomNumber = mt_rand(1111,9999);
echo $FourDigitRandomNumber;
?>
Source : https://www.howtocodeschool.com/2020/08/generate-4-digit-random-number-in-php.html | Last Update : Sat, 23 Oct 21
Question : php 6 digit random number
Answered by : meet-patel
<?php
$sixDigitRandomNumber = mt_rand(111111,999999);
echo $sixDigitRandomNumber;
?>
Source : | Last Update : Sat, 05 Mar 22
Question : php random 5 digit number
Answered by : lokesh-ramchandani-in6l3jq294i2
$limit = 3;
echo random_int(10 ** ($limit - 1), (10 ** $limit) - 1);
Source : | Last Update : Sun, 16 May 21
Question : php randon integer 4 digit
Answered by : habibun-noby
$digits = 3;
echo rand(pow(10, $digits-1), pow(10, $digits)-1);
Source : https://stackoverflow.com/questions/8215979/php-random-x-digit-number | Last Update : Sun, 07 Mar 21
Question : random 6 digit number php
Answered by : red-team
$six_digit_random_number = random_int(100000, 999999)l
Source : | Last Update : Fri, 29 Apr 22
Question : Genrate Random Integer 10 digits in php
Answered by : nilesh
function genrateRandomInteger($len = 10) { $last =-1; $code = ''; for ($i=0;$i<$len;$i++) { do { $next_digit=mt_rand(0,9); } while ($next_digit == $last); $last=$next_digit; $code.=$next_digit; } return $code; }
Source : | Last Update : Mon, 03 Jan 22