title: Can each row in an HTML table be numbered?
body: <p>What I would like to do is number each row in my table. I can't manually number the table myself, as all of the info in it is retrieved from a database. Is this possible with <strong>jQuery or PHP</strong>? Here's a screen shot of the table:</p>
  
  <p><img src="https://i.stack.imgur.com/IySzM.png" alt="Screenshot"></p>
  
  <p><strong>I tried searching for this, and did not find anything that helped me.</strong></p>
  
  <p>Here is the PHP / HTML that is displaying the table:</p>
  
  <p></p>
  
  <pre><code> &lt;tr&gt;
   &lt;th&gt;Name&lt;/th&gt;
   &lt;th&gt;Email&lt;/th&gt;
   &lt;th&gt;Subject&lt;/th&gt;
   &lt;th&gt;Created on&lt;/th&gt;
   &lt;th style="width:65px;"&gt;Status&lt;/th&gt;
   &lt;th&gt;Actions&lt;/th&gt;
   &lt;/tr&gt;
  
  &lt;?php
  
  [...]
  
  //Display the results
  while($info = mysql_fetch_assoc($result)){
  //data
  $name = $info['name'];
  $email = $info['email'];
  $subject = $info['subject'];
  $ticketid = $info['ticket'];
  $isActive = $info['is_active'];
  $created = $info['created'];
      //status
      if($isActive == "1") {
      $status = "&lt;span class=\"open\"&gt;Open&lt;/span&gt;"; 
      $status2 = "active";
      }
      else if($isActive == "0") { 
      $status = "&lt;span class=\"closed\"&gt;Closed&lt;/span&gt;"; 
      $status2 = "closed";
      }
      else {
      $status = "";
      }
      echo  "
  &lt;tr&gt;
  &lt;td style=\"min-width: 87px;\"&gt;$name&lt;/td&gt;
  &lt;td style=\"min-width:248px;\" title=\"$email\"&gt;".addEllipsis($email, 33)."&lt;/td&gt;
  &lt;td title=\"$subject\"&gt;".addEllipsis($subject, 18)."&lt;/td&gt;
  &lt;td style=\"width: 235px;\"&gt;$created&lt;/td&gt;
  &lt;td title=\"This ticket is $status2\"&gt;$status&lt;/td&gt;
  &lt;td&gt;&lt;a href='/employee/employee.php?ticket=$ticketid'&gt;View Ticket &amp;raquo;&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;
      ";
  }
  </code></pre>
  
  <p>As you can see, it's displayed with a <code>while</code> loop.</p>
  
  <p>If anyone knows a way to number each line in my table with <strong>jQuery <em>or</em> PHP</strong>, please help me :)</p>