Numerating Comments
<p>The code below prints out all comments for a given "submissionid" in chronological order.  How could I numerate these comments?  (In other words, how do I print out a "1." next to the oldest comment, a "2." next to the second-oldest comment, etc.?)</p>

<pre><code>$submission = mysql_real_escape_string($_GET['submission']);
$submissionid = mysql_real_escape_string($_GET['submissionid']);

$sqlStr = "SELECT comment.comment, comment.datecommented, login.username
FROM comment
LEFT JOIN login ON comment.loginid=login.loginid
WHERE submissionid=$submissionid
ORDER BY comment.datecommented ASC 
LIMIT 100";         

$result = mysql_query($sqlStr);

$arr = array(); 
echo "&lt;table class=\"commentecho\"&gt;";
while ($row = mysql_fetch_array($result)) { 
    echo '&lt;tr&gt;';
    echo '&lt;td class="commentname1"&gt;'.stripslashes($row["comment"]).'&lt;/td&gt;';
    echo '&lt;/tr&gt;';
    echo '&lt;tr&gt;';
    echo '&lt;td class="commentname2"&gt;&lt;a href="http://www...com/sandbox/members/index.php?profile='.$row["username"].'"&gt;'.$row["username"].'&lt;/a&gt;'.date('l, F j, Y &amp;\nb\sp &amp;\nb\sp g:i a &amp;\nb\sp &amp;\nb\sp  \N\E\W &amp;\nb\sp \Y\O\R\K &amp;\nb\sp \T\I\M\E', strtotime($row["datecommented"])).'&lt;/td&gt;';
    echo '&lt;/tr&gt;';
    }
echo "&lt;/table&gt;"
</code></pre>
