ibanez270dx Posted June 13, 2008 Share Posted June 13, 2008 hello, I need to create a random 10 digit number... I can get a random number with a little snippet I found, but not the fixed length: srand ((double) microtime( )*1000000); $random_number = rand( ); echo "$random_number"; Any suggestions? Thanks, - Jeff Miller Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted June 13, 2008 Share Posted June 13, 2008 You don't need to use <?php srand ((double) microtime( )*1000000); ?> anymore to seed the random number generator. Just use <?php $random_number = rand(1000000000,9999999999); echo $random_number; ?> Ken Quote Link to comment Share on other sites More sharing options...
ibanez270dx Posted June 13, 2008 Author Share Posted June 13, 2008 thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.