';
//make the column headers what you want in whatever order you want
echo '
ID |
DEPT. ID |
UNIT CODE |
UNIT NAME |
UNIT DESCRIPTION |
';
//loop the query data to the table in same order as the headers
$getArea = mysqli_query($conn,$sql);
$statRow = mysqli_num_rows($getArea);
if($statRow > 0){
while($row = mysqli_fetch_array($getArea)){
echo "".$row['id']." |
".$row['dept_id']." |
".$row['unit_code']." |
".$row['unit_name']." |
".$row['unit_desc']." |
";
}
}
echo '';
?>