0
I have the following php code
for ($i = 0; $i <6; $i++){
echo '<div class="item">';
echo $i;
echo '</div>';
}
?>
I would like class until position 3 to be involved by a div, and the two remaining classes to be involved by another class, so that the final result is this below:
<div class="coluna-1">
<div class="item">0</div>
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
</div>
<div class="coluna-2">
<div class="item">4</div>
<div class="item">5</div>
</div>
I made several attempts, but could not, the way I was doing was printing one element inside the other.
Thank you very much Daniel, it worked super well, I only had to pass two more parameters that I had in the code and it was show
– Sérgio Machado