To with a doubt that may be easy, but I have broken the head, I have a table that is generated through an array, follow the code below:
foreach($grupo_arr $k => $v){
?>
<tr>
<td><?php echo $num_array[$k]; ?></td>
<td><?php echo $maq_array[$k]; ?></td>
<td><?php echo $grupo_arr[$k]; ?></td>
<td><?php echo $producao_array[$k]; ?></td>
<td><?php echo (($producao_array[$k]) * 2); ?></td>
<td><?php echo $segunda_array[$k]; ?></td>
<td><?php echo $terceira_array[$k]; ?></td>
<td><?php echo $producao_r_array[$k]; ?></td>
<td><?php echo (($producao_r_array[$k])*2); ?></td>
<td><?php echo $eficiencia_array[$k]."%"; ?></td>
</tr>
<?php } //fecha foreach
generate the table below (photo):
Asyoucanseethereisa"Group" column, these groups range from 1 to 5, well, I would like every change in a group to have a row below the summary of that group, as an average of the production values , efficiency etc, but this is not the problem, the problem is how to include this line with the summary with each change of group, some idea, thank you right away!
Context: the user filters by date, what I want to do is that it already comes separated in the query, at the time that the user filters, does not need to refresh, the image of the post reflects as it is today, but without the summary by group
This is the result of the photo below, done in excel, yellow lines