title: How to echo extra column with number in each row?
body: <p>I have generated table using html,mysql and php. I want to generate an extra column and have a number inserted in each row of this new column.</p>
  
  <pre><code>echo "&lt;table border='1'&gt;
            &lt;tr&gt;
                &lt;th&gt;Rank&lt;/th&gt;
                &lt;th&gt;owner ID&lt;/th&gt;
                &lt;th&gt;Total&lt;/th&gt;
            &lt;/tr&gt;";
  
  while($row = mysql_fetch_array($result))
  {
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;" . '1' . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['owner_id'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['total'] . "&lt;/td&gt;";
      echo "&lt;/tr&gt;";
  }
  echo "&lt;/table&gt;";
  </code></pre>
  
  <p>Now the Rank is the extra column I have generated and where the 1 is, I can currently see it in all rows of this new column. How do I get the other rows to be 2,3,4 ect? I have attempted to insert a new row and inserted a 2 after the "'1'." but this just makes the table loose its structure. </p>