dstroy0
Zeroes and Ones
Yeah, it's a little over the top for what you need. I just deal with PHP that looks like what you have all day long, and it makes the hair on my neck raise up.
No judgement towards you at all -- for context, the codebase I work with was written by "PHP professionals" and more so resembles what a freshman in CS would write. How's that saying go? Make it work, make it fast, make it pretty or something like that... If it's doing what you need, then it's not a big deal.
On that note, Python has a library called BeautifulSoup4 that is fantastic for generating HTML, and has the added benefit of not catching the hate that PHP does. Not sure if you've worked with python at all, but I could throw you some code samples to get an idea of how easy it'd be to switch over (wrote a small app specifically to separate PHP, HTML, CSS, and JS into separate files, and reconstruct the HTML accordingly).
Did you look at the table generator? The php table code should be very readable after I implement that. What would I be scraping with beautifulsoup? Side note, I've already started separating everything into its own file.