I have a foreach
statement in my app that echos a list of my database results:
What leaves your code mostly in tact would be
',(($i % 3) ? "result" : "result_every_third" ));
echo $fp['project_name'];
echo '
But you may want to consider using a for or while construct around "each($featured_projects)" (see http://php.net/manual/en/function.each.php) which may result in neater code.