0

Hi Pritaeas,

My count is already determined in the following for loop:

$values = array ();
for ($a = 0; $a < $sqlSumRowExt1; $a++) {
    $LocalExt1 = mysql_result($sqlSumResultsExt1, $a, 'Ext');
    $LocalTarrif1 = mysql_result($sqlSumResultsExt1, $a, 'Tarrif');
    $Summ = mysql_result($sqlSumResultsExt1, $a, 'Summary');
    $lcr_location1 = mysql_result($sqlSumResultsExt1, $a, 'lcr_data.lcr_location');
    $values[$LocalExt1][$lcr_location1] = round($LocalTarrif1, 2);
    $TotalSum[]=mysql_result($sqlSumResultsExt1, $a, 'Summary');
}   
foreach($TotalSum as $Total){
    echo $Total;    
}
$types = array ('Local', 'National', 'Cell', 'IntNational', '086National');
foreach ($values as $extension => $value) {
    echo '<tr>';
    echo "<td>$extension</td>";
    foreach ($types as $type) {
        echo '<td>';
        if (isset($values[$extension][$type])) {
            echo $values[$extension][$type];
        }
        else {
            echo '&nbsp;';
        }
        echo '</td>';
    }
    echo '</tr>';
}

If I run the $Total it displays the values but I can get get them where I need them.

I need them to be displayed before every total for local, national, international costs etc. If the extension dialed any local numbers it must display the count for local etc.

In the callsNew you will see the values above the costing output.
22433... The 2 = 2 local calls, 24 = 24 national calls and 33 = 33 cell calls and so on. I need to have the 2 before the local cost for that specific extension and 24 before the national cost for the specific extension and so on.

Hope it makes sense.

Regards

Attachments callsNew.GIF 14 KB
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.