include_once 'users.class.php'; include_once 'debts.class.php'; include_once 'payments.class.php'; if (!isset($userObj)) { $userObj = new User(); $userObj->setId($user_id); $userObj->load(); } $debtObj = new Debt(); ?> <div class="row"> <div class="span12"> <h3 class="underline">Total Debts</h3> <table id="debt-table" class="table table-striped"> <?php $total_debts = Debt::getTotalDebts(); $total_str = ""; if (is_array($total_debts) && count($total_debts) > 0) { foreach ($total_debts as $total_name_id => $total_owed) { if ($total_owed > 0) { $userObj->setId($total_name_id); $userObj->load(); $total_name = $userObj->getName(); $total_str .= "<tr><td>{$total_name}</td><td>£" . number_format($total_owed) . "</td></tr>"; } } } ?> <thead> <tr> <th>Name</th>