Re: [PHP] Re: How can I get a random number

2001-01-17 Thread Chris Lee
This might not be quite what your looking for, but I often have then need for a unique number in an incrementing order. random isnt quite the word for it, unique is :) function mtime() { $mtime = microtime(); $mtime = str_replace("\.", '', $mtime); $mtime = explode(' ', $mtime); $mt

[PHP] Re: How can I get a random number

2001-01-16 Thread Angela
I see that you got a lot of responses, but I didn't see anyone using what I use. I had problems using rand() because it wasn't quite random enough. The following code is as random as you can get (at least from what I've seen). mt_srand ((double) microtime() * 100); $myrandomnumber = mt_rand