//Add charge for this call to sum. $totalcharge = $totalcharge + $ca_call_charge;
//Add charge for this call to subtotal. $subtotalcharge = $subtotalcharge + $ca_call_charge;
// See if the current phone number is already in the array of phone numbers. $retno = FindInArray($arrtele, $ca_no_dialled); if($retno = "-1") // If -1, then the phone number is a new one. {
// Determine current size of array, so that we know where to append. $retsize = ArraySize($arrtele);
/* Add the new phone number to our phone numbers array, and put the corresponding cost in the $arramt array.*/ $arrtele[$retsize] = $ca_no_dialled; // The new phone number $arramt[$retsize] = $ca_call_charge; // amount charged } else
/* The current phone number was found in the array. Add the amount charged to the corresponding $arramt element.*/ $arramt[$retno] = $arramt[$retno] + $ca_call_charge;
|