<tr> <th>Zone</th> <th>Region</th> <th>Empid</th> <th>Name</th> <th>Doctor Name</th> <th>Competitor Brand /Device Prescribed</th> <th>Competitor Support (Rs)</th> </tr> <?php $SMList = man_power::SMList(array('WHERE SBH_Emp_Id = ' . $SBH_Emp_Id)); if (!empty($SMList)) { foreach ($SMList as $value) { if ($value->SM_Emp_Id != '') { if (isset($_GET['tmreport'])) { $TMlist = man_power::TMList(array('WHERE SM_Emp_Id = ' . $value->SM_Emp_Id)); if (!empty($TMlist)) { foreach ($TMlist as $value2) { if ($value2->TM_Emp_Id != '') { $view = doctor::TM_Doctor($value2->TM_Emp_Id); if (!empty($view)) { foreach ($view as $v) { ?> <tr> <td><?php echo $value2->Zone; ?> </td> <td><?php echo $value2->Region; ?>