Skip to content

Instantly share code, notes, and snippets.

@brcontainer
Created September 19, 2019 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brcontainer/530b546927b268b33258d963a6bfeb28 to your computer and use it in GitHub Desktop.
Save brcontainer/530b546927b268b33258d963a6bfeb28 to your computer and use it in GitHub Desktop.
simplificar-incremento.php para https://pt.stackoverflow.com/q/411247/3635
<?php
$c = 0;
$permitidos = array(1, 41, 81, 121, 161, 201, 241, 281);
foreach ($all_itens->result() as item) {
$c++;
if (in_array($c, $permitidos)) {
?>
<div class='col'>
<?=$item->id;?>
</div>
<?php
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment