title: Why does my PHP while loop stop after a certain point?
body: <p>When I run the script, the output stops on line 397 i.e. the output looks like "397. 0e4001". <a href="http://173.254.28.121/~iskusno1/hash/" rel="nofollow">Link to the script results</a>. Why does the script stop? It should continue until it meets the criterium.</p>
  
  <pre><code>&lt;?php
  
  $key = "iwrupvqb";
  $num = 0;
  $str = "";
  
  while ($str != "000000") {
      $hash = md5($key . $num);
      $str = substr($hash, 0, 6);
      echo $num . ". " . $str . "&lt;/br&gt;";
      $num++;
  }
  
  ?&gt;
  </code></pre>