loops are something useful in PHP

try to use FOR .. that's how is can be used :
and if you want to use it when you fetch data from databases like MySQL e.g. you need to make sure that mysql_fetch_array() is inside the loop not outside it.. like this :
BTW if you want increment of a variable by 1 , you could use $var++ ..