I have a text
<div class="ti"><div class="pic">
<a href="/categories/rr/1.html"><img src="http://www.erty.com/images/440f2d2a.jpg" alt="Ind"> <span>Ind</span></a> (98)
</div></div><div class="ti"><div class="pic">
<a href="/categories/ert/1.html"><img src="http://www.erty.com/images/4123d2b.jpg" alt="Wes"> <span>Wes</span></a> (6044)
</div></div>
How Can I use preg_match_all in PHP to get
/categories/rr/1.html
Ind
98
for all entries.
I tried
preg_match_all('|[^<div class="ti"><div class="pic">].*?[^<\/div><\/div>]+|',
$test_html,
$out, PREG_PATTERN_ORDER);
But its not working.