title: How to generate a unique digital id in PHP?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1846202/php-how-to-generate-a-random-unique-alphanumeric-string">PHP: How to generate a random, unique, alphanumeric string?</a>  </p>
  </blockquote>
  
  
  
  <p>Does this formula produce collision ?  </p>
  
  <pre><code>substr(md5(uniqid(rand()))),0,6)
  </code></pre>
  
  <p>How to generate a unique ID with only numbers (i.e 7 digits) ?</p>