You need to use DOMDocument to parse the HTML in question and extract the link text. Without more code or more information on what you are trying to do, it is hard to give a full answer.
EDIT: Here is a working example with DOMDocument:
<?php
// Replace this with your actual HTML
$str = '<td class="col3 align"><a href="http://somesite.com/">165</a></td>';
// Create an instance of DOMDocument
$html = new DOMDocument();
// load and parse your HTML
$html->loadHTML($str);
// Get the a tags
$a_tags = $html->getElementsByTagName('a');
// Loop through them
foreach ($a_tags as $link) {
echo $link->nodeValue, PHP_EOL; // prints 165
}
IF the code really is broken HTML like in the sample you gave, you might be able to use a regular expression, like this:
$str = 'td class="col3 align">a href="http://somesite.com/">165</a</td ';
$text = preg_replace('~^.+?a[^>]+>|</a.+$~', '', $str);