How interesting.  Yours work while mine doesn't.  All I did was ..

--snip--
$randomNumber = rand(0,9999999999);
echo $randomNumber;
--snip--

What PHP version do you use?  I only have version 4.3.1 on the machine.


"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
    I looked at the rand() at php.net which spoke about min and max
random
number.  So, I use rand(0,9999999999) to get a 10 digit random number
but it
only return an 1 digit random number that is displayed at '0'.  So, I
tried
rand(0,9999) with 4 digit random number and got the random number.  So,
why
does it not work with 10 digit numbers?
[/snip]

How may tests did you run? I just did this ....

901,476,090
1,161,662,632
1,133,163,790
116,198,549
862,072,958
160,284,836
368,780,044
1,561,820,920
1,407,692,572
1,480,574,886
473,849,932
380,642,419
167,966,462
466,661,331
1,266,542,359
160,809,301
215,539,845
85,493,351
103,799,041
950,218,662
417,076,793
1,190,550,903
658,771,070
1,388,939,508
1,357,822,101

with this....

<?php
$i=25;
while($i > 0){
$random=rand (0,99999999999999999);
echo number_format($random, 0, '', ',')."\n";
$i--;
}
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to