Here is my code :
<tr align="right">
<td style="white-space: nowrap" align="left"><?= $dt_left_header ?></td>
<td></td>
<?php
//trx data
for($p=0; $p < count($arr_prd_grp); $p++){
$prd_id = $arr_prd_grp[$p] ;
//print_r($arr_prd_grp[$p]);
if($left_header[$j][1] == 1){
echo '<td></td>';
}else{
echo'
<td>'.number_format($arr_amt[$coa_id][$prd_id], 2,',','.').'</td>
';
}
}
//TOTAL
if($left_header[$j][1] == 1){
echo '<td></td>';
}else{
echo'
<td>'.number_format($amt_tot += $arr_amt[$coa_id][$prd_id], 2,',','.').'</td>
';
}
?>
</tr>
In this case, I want to calculate total of $arr_amt[$coa_id][$prd_id] . My code already calculate it but the result is not equal with my expectation. Can someone tell me how to make it right? Thanks
$arr_amtsome of this code would make more sense