Mega Code Archive

 
Categories / Php / Math
 

Random Numbers

<html>  <head>   <title>Random Numbers</title>  </head>  <body>  <?php   srand( microtime() * 1000000 );   $num = rand( 1, 100 );   echo( "Microtime:" . microtime() . "<br>");   echo( "A random number: " . $num . "<br>");   $num = rand( 1, 100 );   echo( "Another random number:" . $num );  ?>  </body> </html>