<?php $i = 1; while ($i <= $MAX) { ?> <li><a name="<?php echo $days; ?> ">Room <?php echo $i; ?> Free time <?php echo $days; ?> </a></li> <?php $free = checkFreeTime($days, $i); if (empty($free)) { echo "No Classes registered."; } else { foreach ($free as $t) { echo array_values($t)[0] . "-" . array_values($t)[1] . "<br>"; /*echo "<br>Start TIme: " . array_values($t)[0]; echo "<br>End TIme: " . array_values($t)[1]."<br>";*/ } } //END of ELSE of the if empty checking part $i++; } //End of while loop fpr Rooms } //End of foreach loop for the workingDays
<?php $i = 1; while ($i <= $MAX) { ?> <li><a name="<?php echo $days; ?> ">Room <?php echo $i; ?> Free time <?php echo $days; ?> </a></li> <?php $free = checkFreeTime($days, $i, $userdepartment); if (empty($free)) { echo "No Classes registered."; } else { foreach ($free as $t) { echo array_values($t)[0] . "-" . array_values($t)[1] . "<br>"; /*echo "<br>Start TIme: " . array_values($t)[0]; echo "<br>End TIme: " . array_values($t)[1]."<br>";*/ } } //END of ELSE of the if empty checking part $i++; } //End of while loop fpr Rooms } //End of foreach loop for the workingDays