This function gets all anchor text in a page. This also include anchor text having html tags in them as well.
function getAnchorText($content)
{
$url_pattern="/<a(.*?)>(.*?)<\/a>/is";
preg_match_all($url_pattern,$content,$matches);
return $matches[2];
}
Comments
Post a Comment