<?php
   $result = mysqli_query($con,"SELECT * FROM dailytab WHERE pmp='$pmp'  " ); 
   $row = mysqli_fetch_array($result);
   $c = mysqli_num_rows($result);
   $id1=$row['id']+1;
   $result1 = mysqli_query($con,"SELECT * FROM dailytab WHERE id='$id1'  " ); 
   $row1 = mysqli_fetch_array($result1);
   $i=0;
   $per=1;
   while ($per <= $gym) 
   {
	  $dayf="day".$per;
	  $lesson= $row["$dayf"];
	  if (!empty($lesson))
	  {
		$i++;  
	    $lesson=ltrim(rtrim($lesson));
	    $subj=$row1["$dayf"];
		$mathima[$i]=$lesson;
		$ar=explode('/',$subj);
		$subject[$i]= $ar[1];
		
	  }
	  
	  $per++;
   }
   $subject=array_unique($subject);
  



