<td> </td> <td> </td> </tr> <?php } else { $i = 0; foreach ($commissions_to_pay as $key => $value) { $teachername = $guruAdminModelguruCommissions->getTeacherName($value["author_id"]); $course_name = $guruAdminModelguruCommissions->getCourseName($value["course_id"]); $paypal_or_not = $guruAdminModelguruCommissions->getPaymentOption($value["author_id"]); $paypal_email = $guruAdminModelguruCommissions->getPaymentPaypalEmail($value["author_id"]); $count_orders = $value["orders"]; $amount_pending = $value["amount_paid_author"]; $sum_orders += $count_orders; $checked = JHTML::_('grid.id', $i, $value["author_id"] . "-" . $value["course_id"] . "-" . $value["id"] . "-" . $value["currency"]); if (isset($total_sum_per_currency[$value["currency"]])) { $total_sum_per_currency[$value["currency"]] += $value["amount_paid_author"]; } else { $total_sum_per_currency[$value["currency"]] = $value["amount_paid_author"]; } ?> <tr> <td> <?php echo $checked; ?>