Thread
:
How do I generate a random number from php?
View Single Post
#
3
(
permalink
)
07-24-2007, 02:56 AM
oxygen
D-Web Architect
Join Date: Jun 2007
Posts: 633
Re: How do I generate a random number from php?
To generate a random number between 0 and 100 do this:
srand((double)microtime()*1000000);
echo rand(0,100);
Read more in the php manual:
PHP: rand - Manual
oxygen
View Public Profile
Send a private message to oxygen
Find all posts by oxygen