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 Quote 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? Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/240914-php-count/#findComment-1237516 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.