<?php
$sid = '';
mt_srand ((double) microtime() * 1000000);
$Puddle =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
for($index=0; $index < $this->session_code_length - 1; $index++)
{
$sid .= substr($Puddle, (mt_rand()%(strlen($Puddle))), 1);
}
?>
That should work.
"Awlad Hussain" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
How do i generate a unique random number?
thanks
awlad
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php