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);
$mtime = $mtime[1] . $mtime[0];
return($mtime);
}
Chris Lee
Mediawaveonline.com
"Angela" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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() * 1000000);
> $myrandomnumber = mt_rand($min_number, $max_number);
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]