Matching with preg_match_all()
$html = <<<_HTML_
_HTML_;
preg_match('@
(.*?)@',$html,$matches);
$match_count = preg_match_all('@
(.*?)@',$html,$matches_all);
print "preg_match_all() matched $match_count times.\n";
print "preg_match() array: ";
var_dump($matches);
print "preg_match_all() array: ";
var_dump($matches_all);
?>