<?php
$lesson=array();
$result = mysqli_query($con,"SELECT * FROM dailytab WHERE Teacher='$teach'  " ); 
$rowsub = mysqli_fetch_array($result);
$id=$rowsub['id'];
$i=1;
while ($i<=7)
{
  $in='day'.$i;
  $l=$rowsub["$in"];
  $lesson[$i]= rtrim(ltrim($l));
  $i++;
}

?>

