I have a foreach statement in my app that echos a list of my database results:
foreach
You can use a counter and the modulo/modulus operator as per below:
'; echo $fp['project_name']; echo '