echo '<table border="1" width="100%" cellpadding="5px" id="logTable"> <thead> <tr> <th>' . xlt('ID') . '</th> <th>' . xlt('Sent Date') . '</th> <th>' . xlt('From') . '</th> <th>' . xlt('To') . '</th> <th>' . xlt('Patient') . '</th> <th>' . xlt('Message') . '</th> <th>' . xlt('Due Date') . '</th> <th>' . xlt('Processed Date') . '</th> <th>' . xlt('Processed By') . '</th> </tr> </thead> <tbody>'; $remindersArray = logRemindersArray(); foreach ($remindersArray as $RA) { echo '<tr class="heading"> <td>', text($RA['messageID']), '</td> <td>', text($RA['sDate']), '</td> <td>', text($RA['fromName']), '</td> <td>', text($RA['ToName']), '</td> <td>', text($RA['PatientName']), '</td> <td>', text($RA['message']), '</td> <td>', text($RA['dDate']), '</td> <td>', text($RA['pDate']), '</td> <td>', text($RA['processedByName']), '</td> </tr>'; } echo '</tbody></table>'; die;
<thead> <tr> <th>' . xlt('ID') . '</th> <th>' . xlt('Sent Date') . '</th> <th>' . xlt('From') . '</th> <th>' . xlt('To') . '</th> <th>' . xlt('Patient') . '</th> <th>' . xlt('Message') . '</th> <th>' . xlt('Due Date') . '</th> <th>' . xlt('Processed Date') . '</th> <th>' . xlt('Processed By') . '</th> </tr> </thead> <tbody>'; $remindersArray = array(); $TempRemindersArray = logRemindersArray(); foreach ($TempRemindersArray as $RA) { $remindersArray[$RA['messageID']]['messageID'] = $RA['messageID']; $remindersArray[$RA['messageID']]['ToName'] = $remindersArray[$RA['messageID']]['ToName'] ? $remindersArray[$RA['messageID']]['ToName'] . ', ' . $RA['ToName'] : $RA['ToName']; $remindersArray[$RA['messageID']]['PatientName'] = $RA['PatientName']; $remindersArray[$RA['messageID']]['message'] = $RA['message']; $remindersArray[$RA['messageID']]['dDate'] = $RA['dDate']; $remindersArray[$RA['messageID']]['sDate'] = $RA['sDate']; $remindersArray[$RA['messageID']]['pDate'] = $RA['pDate']; $remindersArray[$RA['messageID']]['processedByName'] = $RA['processedByName']; $remindersArray[$RA['messageID']]['fromName'] = $RA['fromName']; } foreach ($remindersArray as $RA) { echo '<tr class="heading"> <td>', text($RA['messageID']), '</td> <td>', text($RA['sDate']), '</td>