I was trying to make a Alphanumeric string and use it for a unique field in my database , it is not a replacement of the Primary key mind it . The following code is generating a 22 length text but my concern is will it continue to produce unique strings as i might need it for unique identification of the data. 

```
<?php

$len =22;

$rand = substr(str_shuffle(md5(time())),0,$len);

echo $rand;

?>

```