Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. All programs tested and works. Contact: aviboots(AT)netvision.net.il
GreenGeeks Web Hosting - Faster, Scalable & Eco-Friendly

BlueHost Web Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

getflywheel wordpress hosting


Distribute your Resume to 500+ Job Boards & Recruiters


8,090 questions

11,268 answers

573 users

How to fill an array with random numbers in PHP

1 Answer

0 votes
$arr = array();

for ($i = 0; $i < 15; $i++) 
    $arr[$i] = rand(1, 1000);


foreach($arr as $n) 
    echo $n . "</br>";
 
  
/*
run: 
 
398
362
791
830
249
732
379
65
755
420
669
729
884
20
379
   
*/

 




answered May 14 by avibootz
...