[eluser]Brad K Morse[/eluser]
You need to restructure your tables.
You will two queries, one for grabbing the days and courses they teach.
Then another query for grabbing the course end/start times.
Then loop thru each day, printing the course, then the corresponding start/end time for each course.
so the foreach loops would look like:
Code:
<?php foreach($day as $d): ?>
<?=$d->day_title?>
<?php foreach($course as $c):
if($c->day_id = $d->id): ?>
<?=$c->start_time?> - <?=$c->end_time?>
<?php endif;
endforeach; ?>
<?php endforeach; ?>
Didn't test it out, but you may need to restructure the table and then get the queries up and running, grabbing the appropriate data