kade119 Posted July 2, 2011 Share Posted July 2, 2011 I have a category of images that are generated in to <li> tags and after 4 <li> tags I need a new line to start so <br /> to insert after that 4th </li> could someone assist me Link to comment https://forums.phpfreaks.com/topic/240914-php-count/ Share on other sites More sharing options...
gizmola Posted July 2, 2011 Share Posted July 2, 2011 Where is your code? Link to comment https://forums.phpfreaks.com/topic/240914-php-count/#findComment-1237508 Share on other sites More sharing options...
WebStyles Posted July 2, 2011 Share Posted July 2, 2011 Something like this: before your loop: $cnt = 0; inside loop, at the beginning: // loop starts here $cnt++; if($cnt % 4 === 0) echo '<br />'; // rest of loop Link to comment https://forums.phpfreaks.com/topic/240914-php-count/#findComment-1237516 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.