I'm having a bit of a problem trying to figure out how to accomplish the following:
I have these two time table blocks as below and I want to read content from an XML file to populate them using PHP.
Using the following XML to populate the blocks:
So the outcome would be:
The problem I'm having is I can't figure out how to dynamically fill in the blocks based on the XML. I was thinking about slicing up each block into equal parts (maybe by 15 minutes) then filling them in depending on the length of each class but I feel there would be an easier way of doing so and I want to overlay the name over each block (so it might be easier to have full blocks not multiple small ones combined). I think I'll be using simpleXML to check the names of each block from the XML to know which block to fill but can't figure out how to set the times so could do with some tips on where to start. Sorry if this is a bit unclear, I can elaborate if needed.