Click to See Complete Forum and Search --> : Programming question


khayman2001
03-10-2003, 02:28 PM
I'm looking to create a random number for a variable, and have no clue how to do so. I'm looking to write a text-based game in php, which I've yet to delve into very deeply, but I know I'll need several random numbers. Is this only done in some non-web-based language, or what?

Nedals
03-10-2003, 02:38 PM
PHP has a
randomNo = mt_rand(min,max);

Will that do it?

khayman2001
03-10-2003, 02:47 PM
Yeah, that should work great, thanks.