title: PHP Iterator like mysql iterator?
body: <p>Already I extended and implemented from <code>SPL</code> iterator.<br>
  But if I want to use it, I should use it on a <code>foreach</code>.<br>
  I tried to use it in a <code>while</code> like this:  </p>
  
  <pre><code>$news = new testClass();
  
  while( $row = $news )
      echo $row["name"];
  </code></pre>
  
  <p>It will create an infinite loop !<br>
  But with foreach, it works fine!  </p>
  
  <p>Here is top of my class:  </p>
  
  <pre><code>class testClass implements \Iterator
  </code></pre>
  
  <p>Where is the mistake ?</p>