Created
September 19, 2012 15:39
-
-
Save irwinv/3750334 to your computer and use it in GitHub Desktop.
adaptation de foreach par 5 paquet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="menu-search-by-brand-ul-3" style="display: block"> | |
<ul> | |
<?php $lot = 5; ?> | |
<li> | |
<?php foreach ($noBrands as $key => $brand): ?> | |
<?php if($key < $lot); ?> | |
<?php if ($brand != 'Citroën' && $brand != 'Peugeot' && $brand != 'Renault' && $brand != 'Sans Permis'): ?> | |
<a href="<?php print url_for('@as_page_brand?marque_slug=' . local_slugify($brand) . '&intcmp=header_' . local_slugify($brand)) ?>" rel="nofollow"><?php print $brand ?></a> | |
<?php endif; ?> | |
<?php if($key == $lot && $key > 0): ?> | |
<?php $lot += 5; ?> | |
</li> | |
<li> | |
<?php endif; ?> | |
<?php endforeach; ?> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment