title: I want to generate thirty unique alphanumeric strings in PHP loop
body: <pre><code>&lt;?php
  // Set length of the string
  $length = 30;
  $random = substr(md5(rand()), 0, 15);
  // Use for-loop to generate thirty unique alphanumeric strings
  For($i=0; $i&lt;$length;) {echo $random.$i++."&lt;br /&gt;";
  </code></pre>
  
  <p>The code above generates something like 5523d651bfb642b0, 5523d651bfb642b1, 5523d651bfb642b2, 5523d651bfb642b3 etc. The next value is just too easily predictable. I want something totally different like when I refresh the page in the browser. If I remove loop and just echo $random, the page generates a totally different string every time I refresh the page. How do I generate something totally different like 5523d651bfb642b0, 2yyd00nngbh201km, 78gdfmpqg01597v etc using loop? Thanks.</p>