0
Does anyone know how to group data without using group_by in consultation?
I need every 10 loop results (foreach), create a div, that is, 10 records within each div, I don’t care about the values.
<?php foreach($resultados->result() as $resultado){ ?>
<?php for($i = 0; $i <= 10; ++$i){ ?>
<div>
<?php } ?>
<?=$resultado->id?>
<?php for($i = 0; $i <= 10; ++$i){ ?>
</div>
<?php } ?>
<?php }// foreach ?>
I made a quick example: https://hastebin.com/awokiviyon.xml
– Valdeir Psr
IT WORKED! Thanks for the help, the last <div> generated is empty, but it’s working for me. How do I give a note for the help?
– Anderson Felipe
@Andersonfelipe To give a point, is the "triangle" up. To accept the answer, check the "V" which will turn green. IMAGE
– rbz