--------------EDIT------------------------
So i am going with the DOM approach. Here is what I have so far:
One way to make this easier is to use a dom parser http://simplehtmldom.sourceforge.net/ .
You are still going to have to extract the information into an array but this will make it easier to iterate through the elements one by one.