Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 8, 2023 02:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
<?php
$x = 1;
$abierta = false;
$cadaCuantos = 4;
foreach ($datos0 as $dato0) {
if (!$abierta) {
echo '<div class="row" style="padding:10px;">';
$abierta = true;
}
echo '<div class="col-md-3 ">
Aquí más elementos...
</div>';
if ($x % $cadaCuantos == 0) {
echo '</div>';
$abierta = false;
}
$x++;
}
if ($abierta) {
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment