this one shown you the text between the <a>-tags, of course you should modify a bit 🙂
$file = "index.html";
$fp = fopen($file,"r");
$contents = fread ($fp, filesize($file));
fclose($fp);
preg_match_all ("/<a(.)>(.)<\/a>/i",$contents,$out);
for($i=0;$i<sizeof($out[2]);$i++) {
echo "<br>($i): ".$out[2][$i];
}
a "print_r($out)" may help you.