title: php & mysql while loops
body: <p>I'm new in PHP and I think this is an easy question.</p>
  
  <p>I can show the content that comes from my db this way:</p>
  
  <pre><code>...
  ...
   &lt;?php while($rows = mysql_fetch_array($queryNews)){    ?&gt;
    &lt;div class='title_news'&gt;&lt;?php echo $row['Title'] ?&gt; &lt;/div&gt;
  .... and so on... 
  </code></pre>
  
  <p>Thats ok so far</p>
  
  <p>Then I want to simulate a kind of pagination: I mean showing as many numbers as news
  I first tried a for-loop</p>
  
  <pre><code>&lt;?php for($i=1; $i&lt;= sizeof(mysql_fetch_array($queryNews)); $i++){ ?&gt;
      &lt;div class="num_txt"&gt;&lt;?php echo $i ?&gt;&lt;/div&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>No success. so I tried an similar  way as the first one, also without success.</p>
  
  <pre><code>    &lt;?php 
          $i=1;
          while($row = mysql_fetch_array($queryNews)){    ?&gt;
          echo '&lt;script language="javascript"&gt;confirm('.$i.')&lt;/script&gt;;';
              &lt;div class="num_txt"&gt;&lt;?php echo $i ?&gt;&lt;/div&gt;
     &lt;?php $i++; } ?&gt;
  </code></pre>
  
  <p>Does anyone knows what I'm doing wrong??
  Thanks</p>