// Set up the counter with the code I posted in post #4$threadnum = $startfrom;$db->query....while($somevar = $db->fetch_array(...{ // Do your other code here // Use $threadnum in your template or where ever you want to use the counter // Increment the counter $threadnum++;}