The one thing I would add to Capo64's solution would be to use modulus and then you don't have to reset the counter. Something like:
Code:
$i = 1;
if($i % 5 = 0)
echo <br />
The % is modulus which returns the remainder of a division. Everytime it is 0, you have looped 5 times. For this particular case, Capo's solution is just as good although later you may find you get into bigger projects and the modulus technique will be more useful. Have fun!