title: How do you increment a number with every table row?
body: <p>It is very simple, but I cannot do it. Now it takes every information from my database and introduces it in the Nr. td. How can I increment the value with every row?</p>
  
  <pre><code>&lt;?php while ($row=mysql_fetch_array($query)) { ?&gt;
  
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td (this is what I want to auto-increment)&gt;
  
                  &lt;?php
                      $i = 1;
                      foreach($row as $i){
                      $i++;
                      echo $i;
                      }
                  ?&gt;
  
              &lt;/td&gt;
              &lt;td width="120"&gt;
  
                  &lt;?php echo $row['Name'];?&gt;
  
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>Thanks!</p>