I want to get value from a href.
Here is the HTML I am working with:
<div class="streeet">
<b>Name:</b>wwww<br />
<b>Post Code:</b>97
<b>City:</b>
<a href="/bar-fan-pers.html" title="abcd">VALUE</a>
<br />
</div>
I am trying to use preg_match_all
:
preg_match_all('/<div\s*class=\"walldetsleft\">[^>]*<a\s*href=\"[^>]*\"\s[^\>]*>(.*?)<\/a>/', $url, $val);
It does not work - the output is just an empty array. How can I write a regex to do this?