$newarray["username"] = ""; $newarray["email"] = ""; $newarray["status"] = ""; $return_arr["aaData"] = $newarray; } echo json_encode($return_arr); break; case "review": $list = $dbobj->getclientbyid($cust_id); $comments_List = $dbobj->getComments($cust_id); $tableOutput = "<table width='80%' style='border-collapse: collapse; margin-top:20px;margin-left:15px;' ><col width='70%'><col width='20%'><col width='10%'><tr><th>Comment</th><th>Date</th><th>By</th></th>"; foreach ($comments_List as $value) { $tableOutput .= "<tr style='border-bottom: 1px solid; height:80px;' ><td>" . $value['comment'] . "</td><td>" . $value['timestamp'] . "</td><td>" . $value['username'] . "</td></tr>"; } $tableOutput .= "</table>"; $infoAudit_List = $dbobj->getauditdd(1); $emtAudit_List = $dbobj->getauditdd(2); $contractAudit_List = $dbobj->getauditdd(3); //build audit dropdown into jason $list['IAL'] = $infoAudit_List; //get the built DD code $list['EAL'] = $emtAudit_List; //get the built DD code $list['CAL'] = $contractAudit_List; $list['COMMENT'] = $tableOutput; //get the built DD code echo json_encode($list); break; case "add_comment": // add the comment $comment = $_GET["info_comment"];