I am using file_get_contents to get the html from a website. I am then trying to use preg_match to extract certain parts of it.
For example, I want to get the description.
The HTML looks like this:
<div class="row fdDescription"> <em>Description</em><br />
A wonderful opportunity to purchase a substantial four double bedroom detached home located in a highly sought after residential location. This impressive family home enjoys a wonderful south facing rear garden which is a real feature of this property.The property provides well planned accommodation arranged over two floors and offers further scope to extend or convert the loft, subject to the necessary planning consents.Marshals Drive is considered as one of St Albans premier addresses popular with families due to the close proximity to highly regarded schooling for all ages.The Quadrant shopping parade is close by, along with a library and tennis club, the city centre and mainline station are within walking distance. <br />
<br />
<b>ACCOMMODATION</b
I have tried multiple ways but none seem to work:
preg_match('/<em>(.*?)<b>/', $data, $match);
$desc = $match[1];
$desc = htmlspecialchars($desc);
echo "<b>Description:</b> " . $desc;