hi
i have a variable. it has a long html string.
like as:
$var='<html><head></head><body><br><p>hello</p><a href="page1.htm">page1.htm</a><hr><img src="pic.jpg"><div align=center><a her="http://www.google.com">google</a><br></p></body></html>';
i want to fetch all links stings form this variable to an array.
for this example the result must:
res[0]='<a href="page1.htm">page1.htm</a>';
res[1]='<a her="http://www.google.com">google</a>';
how do i can fetch links stings? anyone can help me?