I need to fetch lessons from an online timetable(for a school) into an array. So i can insert the data into my database. The online timetable(url: roosters-hd.stenden.com) looks like this:
On the left hand we see the times, and on top the schooldays (Mo, Tu, We, Th, Fr). Very basic.
Each lesson contains 6 values that i need to fetch.
Besides that, I also need to fetch the [startDate] and [endDate]. Time is based on which row the lesson-cell is at, and how much rowspan it has. Date can be calculated by adding column number onto the start date(printed on top). So in the end the array would look something like this:
[0] => Array
(
[0] => Array
(
[Name] => Financiering
[Type] => WC
[Code] => DECBE3
[Classroom] => E2.053 - leslokaal
[Teacher] => Verboeket, Erik (E)
[Class] => BE1F, BE1B, BE1A
[StartDate] => 04/06/2013 08:30:00
[EndDate] => 04/06/2013 10:00:00
)
etc.
Because my lack of experience in fetching data, I will properly end up with a highly inefficient and inflexible solution. Like should i use XML-parser? Or Regex? Any ideas on how to tackle this problem?