Home Apache PHP Ubuntu MySQL Linux HTML Win CSS Perl Javascript Rants Retro
 
Print This Page
Date Posted: Sunday 29th of August 2010 | Category: PHP
Create a random number in PHP
To create a random number in PHP just copy and paste the code below.

<?php
srand ((double) microtime( )*1000000);
$random_number = rand( );
echo "$random_number";
?>