467,915 Members | 1,861 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

I have a problem with my class scheduler something quite wrong in my code

This is the image



Expand|Select|Wrap|Line Numbers
  1. <div class="table-responsive">
  2.                 <table class="table table-bordered table-hoverable table-striped" id="tblClassScheduler">
  3.                     <thead>
  4.                        <tr>
  5.                          <?php
  6.                           $days=array("Monday"=>1,"Tuesday"=>2,"Wednesday"=>3,"Thursday"=>4,"Friday"=>5,"Saturday"=>6,"Sunday"=>7);
  7.                           for ($i=0;$i<COUNT($days);$i++) { 
  8.                             echo "<th>".date("D m/d",strtotime(" +".$i." days"))."</th>";
  9.                           }
  10.                        ?>
  11.                        </tr>
  12.                     </thead>
  13.                     <tbody>
  14.                         <?php
  15.                             $start_time=strtotime("08:00");
  16.                             $end_time=strtotime("22:00");
  17.                             for ($j=$start_time; $j<=$end_time; $j+=1800) { 
  18.                                 echo "<tr>
  19.                                         <td id='time".$j."'>".date("H:i",$j)."</td>
  20.                                         <td id='time".$j."'>".date("H:i",$j)."</td>
  21.                                         <td id='time".$j."'>".date("H:i",$j)."</td>
  22.                                         <td id='time".$j."'>".date("H:i",$j)."</td>
  23.                                         <td id='time".$j."'>".date("H:i",$j)."</td>
  24.                                         <td id='time".$j."'>".date("H:i",$j)."</td>
  25.                                         <td id='time".$j."'>".date("H:i",$j)."</td>
  26.                                 </tr>";
  27.                             }
  28.  
  29.                         ?>
  30.                     </tbody>
  31.                 </table>
  32.                 <center><button type="submit" class="btn btn-primary" id="save_class_schedule" id="save_class_schedule">Save</button></center>
  33.             </div>
Sep 25 '20 #1
  • viewed: 974
Share:

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

66 posts views Thread by Mike Stenzler | last post: by
2 posts views Thread by Kostadis.Spirou | last post: by
6 posts views Thread by tshad | last post: by
7 posts views Thread by MonkeyHater | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.