[RESOLVED] Need help on data extract script
I need help extracting info from a HTML table.
The table have 5 columns and many rows. I want to extract the table information into an array so I can save in database.
This is the HTML code i'm dealing with:
Code:
<tr>
<td bgcolor=#FFFFFF><b>
Data1 </b></td>
<td bgcolor=#FFFFFF>Data2</td>
<td bgcolor=#FFFFFF colspan="2">Data3</td>
<td bgcolor=#FFFFFF>Data4</td>
<td bgcolor=#FFFFFF>Data5</td>
</tr>
<tr>
Data1 </b></td>
<td bgcolor=#FFFFFF>Data2</td>
<td bgcolor=#FFFFFF colspan="2">Data3</td>
<td bgcolor=#FFFFFF>Data4</td>
<td bgcolor=#FFFFFF>Data5</td>
</tr>
PHP should be able to handle this easy with preg_match_all() but i'm unable to make a regular expression for this one. Please help!
Thanks for attention!
Last edited by bubu; October 16th, 2008 at 04:38 PM.
All consequences are eternal in some way.