vostro Posted April 20, 2013 Report Share Posted April 20, 2013 Sveiki visiem! Nevaru atrast risinājumi Ir <div class="slide-box"></div> viņā ir iekšā <div class="box-container"></div> katrā box-container var izvadīt tikai 3 postus. <div class="slide-box"> <div class="box-container"> <?php foreach ($services as $item):?> <?=$item['title'];?> <?php endforeach;?> </div> </div> Rezultātam jābūt, lai pēc 3 postiem veidotos <div class="slide-box"></div> un iekšā atkal <div class="box-container"></div> ar 3 ierakstiem. Quote Link to comment Share on other sites More sharing options...
blackhalt Posted April 20, 2013 Report Share Posted April 20, 2013 POC <?php $daudz=range(0,100); foreach ($daudz as $cipars => $vajag) { if($cipars % 3 == 0){ echo "<br />\n"; } echo "$vajag,"; } ?> Quote Link to comment 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.