0

Possible Duplicate:
Robust, Mature HTML Parser for PHP

i have html file like

<table class="example2" >
<td >15-06-2012</td>
 <td >154</td>
    <td >1.34</td>
    <td >60</td>
   <td >25</td>
    <td >15</td>
 <td >Doctors service, Nursing service, Auxiliary Service</td>
 </tr>
</table>

Actually these value are from data base. And may be more than 200. I want to use pasing html. As i am new to parsing please give me one example to make it easy to understand.

Community
  • 1
  • 1
Vadapalli
  • 123
  • 8

1 Answers1

1

Parsing HTML can be quite a chore... Since HTML is primarily a presentation markup language, the syntax makes data extraction a bit of a challenge. Tags may not be well-balanced, a tag like <b> doesn't really provide data context, etc.

Your best bet is to use an existing library, such as PHP Simple HTML DOM Parser.

jheddings
  • 26,717
  • 8
  • 52
  • 65