Quarterly Schedule (' . $quarter . ' ' . $year . ')'; //-------- Prints Table -----------// echo '

'; //Variable needed for printing bottom border of rows (will only have values of 1 and 2, initially set at 1) $borderCounter = 1; //Variable used to help printing notes $notesDate = ''; //Cycles through each row of mysql result (for current schedule) while($row = mysql_fetch_assoc($result1)) { //Sets date info from current quarter $date = $row['MONTH'] . '/' . $row['DAY']; $time = $row['TIME']; //Gets canceled info $canceled = $row['REASON_CANCELED']; //Gets special notes $notes = $row['NOTES']; //Decides whether or not to print bottom border $borderDecider = $borderCounter % 2; if($borderDecider == 0) { $bottomborder = true; } else { $bottomborder = false; } //Go here if presentation is not canceled if($canceled == '') { //Sets name of presenter if($row['PRESENTER_FIRST'] == '') { $presenter = ''; } else { $presenter = $row['PRESENTER_FIRST'] . ' ' . $row['PRESENTER_MIDDLE'] . ' ' . $row['PRESENTER_LAST'] . ', ' . $row['PRESENTER_TITLE']; } //Sets presentation title if ($row['PRESENTATION_TITLE'] == '') { $title = 'To Be Announced'; } else { $title = $row['PRESENTATION_TITLE']; } //Prints Presenation Special Notes if($notes != '' && $notesDate != $date) { echo ''; $notesDate = $date; } //Prints presentation data in new table row if($bottomborder) { echo ''; } else { echo ''; } //Go here if presentation is canceled } else { //Sets presenter and title info $presenter = ''; $title = $canceled; //Prints cancled data in new row if($bottomborder) { echo ''; } else { echo ''; } } //Updates bottom border deciding info if ($borderCounter == 1) { $borderCounter++; } else { $borderCounter = 1; } } echo '
DATEPRESENTATION TITLEPRESENTER
' . $notes . '
' . $date . '
' . $time . '
' . $title . '' . $presenter . '
' . $date . '
' . $time . '
' . $title . '' . $presenter . '
' . $date . '
' . $time . '
' . $title . '
' . $date . '
' . $time . '
' . $title . '' . $presenter . '
'; //-------- Ends Printing Table -----------// ?>