hey guyz I want to get the content between <td style="border-top: 1px solid black;">bla bla bla</td> i used this pattern but it always gives me the whole page with <td: if(preg_match_all('/(<td style=\"border-top: 1px solid black;\">(.*)<\/td>)/' Code (markup): it should give me bla bla bla...any ideas?
The easy way to do this with explode the str. <? $page=file_get_contents('http://centralops.net/co/DomainDossier.aspx'); $a=explode('<td valign=bottom>',$page); for($i=1;$i<count($a);$i++){ $b=explode('</td>',$a[$i]); echo $b[0].'<br>'; } ?>
preg_match_all is a lot better, regular expressions are very powerful. You have 4 line of code compared to one