Possible Duplicate:
How to parse and process HTML with PHP?
I have the following HTML output I want to match the data from it, tried with preg_match() and preg_match_all() with no success.
<td width="130" valign="top">
Jane Doe<br />
101 Marisa Cir <br />
Staten Island NY, 10309<br /><br>
I want to match the "address data" as:
Jane Doe, 101 Marisa Cir Staten Island NY, 10309
I fetch the page with CURL. I tried with something like this with no success:
preg_match('~<td width="130" valign="top">(.*?[^<])<br /><br>~i', $str, $showme);