Hey guys. I’m new to this forum, PHP and programming itself. I’m looking for some guidance with a project I’ve been working on.
I have a DB of TV shows I watch. It includes the day of week the show is on. I’m able to figure out how to pull the show based on the day of week but I ended up writing 7 functions (1 for each day.) I know there’s a way to cover this in one function or class but I’m having trouble conceptualizing this.
I’m not asking for code itself but just some guidance on how to approach it. I essentially have a table-style layout with 7 columns (1 for each day.) I need something that will put each show in it’s corresponding column based on the dow field in that show’s record.
One idea I have is to somehow target a div with an id for each day of week but I’m not sure how to go about that.
Thanks!