Quote:
Originally Posted by abduraooft
But why do you need the second loop? You could use a counter variable, and increment it inside the first while loop to print the index.
|
like this
PHP Code:
$i=0;
while($row = mysql_fetch_array( $result )) {
echo $i. " - " . $row['fieldname'] . "<br />";
$i++;
}