Hi,
I have a large string that contains HTML tags. Here is an example:
$html = "<a name='top'></a><h1><div id='heading'>Page Title</div></h1>other text goes here";
Basically, I need to pull out the contents within the <div id="heading"> </div> tags (i.e. in this case, the words "Page Title"). This is the code I had but it would not return any matches:
preg_match("!(<div id=\"heading\">)(.*)(</div>)!", $html, $matches);
Anyone have a solution?
Rob