Jump to content

[SOLVED] Incrementing Numbers


monkeypaw201

Recommended Posts

To explain what mgallforever did:

 

<?php
$x = 1; // This is the increment number, and it starts at 1

while($row = mysql_fetch_assoc($res)){ // Since this is the while loop, the number of times the $x will go up by is when there is no more rows.
echo $x . "<br>"; // Print out the Rows
$x++; // Increment ++ to add +1 everytime
}
?>

 

You could do this without help mostly. If you think about the logic behind it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.