How about this?
<?php
$contents = file_get_contents('http://....');
$pattern =
'@' .
'<td>\s*+' .
'(?P<no>\d+)\.\s*+' .
'</td>\s*+' .
'<td>\s*+' .
'<a class="LN" href="[^"]*+" onclick="[^"]*+">\s*+' .
'<b>(?P<name>[^<]*+)</b>\s*+' .
'</a>\s*+' .
'</td>\s*+' .
'<td align="center">[^<]*+</td>\s*+' .
'<td>\s*+' .
'(?P<locations>(?:<a href="[^"]*+">[^<]*+</a><br />\s*+)++)' .
'</td>' .
'@'
;
$results = array();
preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER);
foreach ($matches as $i => $match) {
preg_match_all('@<a href="[^"]*+">([^<]*+)</a>@', $match['locations'], $locations);
$results[$i]['no'] = $match['no'];
$results[$i]['name'] = $match['name'];
$results[$i]['locations'] = $locations[1];
}
echo '<pre>';
print_r($results);
echo '</pre>';
This will work perfectly.