Simple solution:
$unique = time() . $$ . rand;
In reply to Re: Need to Generate Unique String by ccn in thread Need to Generate Unique String by EchoAngel