I have the code below that prints from 28 to 31 lines (according to the month) and I wanted to instead of printing 1 below the other to make 4 columns of 8 or so the layout gets better.
My code
<table border="0">
<?php
$total_dias = date("t", mktime(0,0,0,date('m'),'01',date('Y')));
for($dia = 1; $dia<= $total_dias; $dia++){
if($dia <= 9){
$dia = '0'.$dia;
}
echo '<tr>';
echo '<td>'.$dia.'/'.date('m').' - '.$this->agendamento->HorariosDisponiveisPorData($profissional->id, date('Y').'-'.date('m').'-'.$dia).'</td>';
echo '</tr>';
}
?>
</table>
How could you break these 31 outputs into 4 columns?