hi, I have an html file... I want to get the content betweeen'<td colspan=2>' and'<br><br>' and assign it to a variable.'Ther wiil be more than one match... Can you help me to print only the content between this tags... Thank You. Peter
preg_match_all( "/<td colspan=2>(.*)<br><br>/sU", $html, $matches );
The matches are stored in an array, $matches[1], and can be looped through with:
foreach( $matches[1] as $item ) print "$item<br>\n";
See also: http://www.phpbuilder.com/manual/function.preg-match-all.php
-Rich