While incrementing wrong way

Hi,

Take a look at the following snippet of code:


   if(isset($conf)):
       $i = 1;
       while($row = mysql_fetch_array($authors)):
           echo "Author ".$i."";
       $i++;
       $i = $i % 2;
       endwhile;
    endif;

It displays like this:

Author 1:
Author 0:

I want it to display like this:

Author 1:
Author 2:
Author 3:


Author 10:

And so on…

Can someone help?

Thanks

$i = $i % 2;

Remove that line? Why is it even there?

Thanks!

:wink: