<div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-hover" id="dataTables-example"> <thead> <tr> <th>ID </th> <th>Section</th> <th>Course</th> <th>Status</th> <th>Action`</th> </tr> </thead> <tbody> <?php foreach ($section->sectionList() as $a) { ?> <tr class="odd gradeX"> <td><?php echo $a['section_id']; ?> </td> <td><?php echo $a['name']; ?> </td> <td><?php $c = $section->courseData($a['course_id']); echo $section->course_name; ?>