Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,999 questions

51,944 answers

573 users

How to generate 10 digits random numbers in PHP

1 Answer

0 votes
for ($cout = 0; $cout < 20; $cout++) {
    $s = "";
    for ($i = 0; $i < 10; $i++) {
        $s = $s . rand(0, 9); 
    }
    echo $s . "<br />";
}

 
 
 
   
/*
run:
        
6422614197
7384778051
6732906118
1635920060
1301467315
6744439358
6559174767
3232100166
3881185383
9015605993
4552346332
8467087602
9110830314
4863356966
6871592532
6638715755
9825197572
4424061504
0324585916
5966799654
 
*/

 



answered Jun 21, 2019 by avibootz
edited Jun 21, 2019 by avibootz

Related questions

1 answer 140 views
1 answer 292 views
1 answer 116 views
1 answer 141 views
1 answer 139 views
1 answer 122 views
2 answers 176 views
...